Envoy ASSERT() due to regex rewrite path string contains

It is observed that Envoy crash in ASSERT() due to regex rewrite path string contains invalid character '
'.

We should prohibit null characters , 
,
 in the regex rewrite substitution string. This is well guarded in most other cases like RouteAction:prefix_rewrite, but is missing in RouteAction:regex_rewrite:substitution.

Signed-off-by: Yanjun Xiang <yanjunxiang@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 23f3ee57b012e28aea0d6e7bdd6a991edd392741
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent d852363a9e
commit ac1d65886d
  1. 3
      envoy/type/matcher/v3/regex.proto

@ -95,5 +95,6 @@ message RegexMatchAndSubstitute {
// backslash followed by the capture group number to denote a numbered
// capture group. E.g., ``\1`` refers to capture group 1, and ``\2`` refers
// to capture group 2.
string substitution = 2;
string substitution = 2
[(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
}

Loading…
Cancel
Save