Fix fuzz OSS-issue-21276 (#11450)

The issue happened because in "regex_rewrite {}" field of the config input, there is a "substitution" field but there is no "pattern" field.

The fix is to add "required" to "RegexMatcher pattern" field of api/envoy/type/matcher/v3/regex.proto.

Signed-off-by: jianwen <jianwendong@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ abfa72479267de2e57e3e042f9b303d8d47c77ef
master-ci-test
data-plane-api(CircleCI) 5 years ago
parent 1ab04e0ae2
commit 79cbceeb5b
  1. 2
      envoy/type/matcher/v3/regex.proto
  2. 2
      envoy/type/matcher/v4alpha/regex.proto

@ -62,7 +62,7 @@ message RegexMatchAndSubstitute {
// so as to replace just one occurrence of a pattern. Capture groups can be
// used in the pattern to extract portions of the subject string, and then
// referenced in the substitution string.
RegexMatcher pattern = 1;
RegexMatcher pattern = 1 [(validate.rules).message = {required: true}];
// The string that should be substituted into matching portions of the
// subject string during a substitution operation to produce a new string.

@ -57,7 +57,7 @@ message RegexMatchAndSubstitute {
// so as to replace just one occurrence of a pattern. Capture groups can be
// used in the pattern to extract portions of the subject string, and then
// referenced in the substitution string.
RegexMatcher pattern = 1;
RegexMatcher pattern = 1 [(validate.rules).message = {required: true}];
// The string that should be substituted into matching portions of the
// subject string during a substitution operation to produce a new string.

Loading…
Cancel
Save