Skip to content

Commit

Permalink
[api] Add header value restriction for via configuration field (#15573)
Browse files Browse the repository at this point in the history
Adds an HTTP header value restriction to avoid \r\0\n characters in via configuration in the HCM.

Risk Level: Low, already crashes on ASSERT
Testing: Added corpus entry
Fixes
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30089

Signed-off-by: Asra Ali <[email protected]>
  • Loading branch information
asraa authored Mar 21, 2021
1 parent dff506f commit a240824
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ message HttpConnectionManager {

// Via header value to append to request and response headers. If this is
// empty, no via header will be appended.
string via = 22;
string via = 22 [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];

// Whether the connection manager will generate the :ref:`x-request-id
// <config_http_conn_man_headers_x-request-id>` header if it does not exist. This defaults to
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a240824

Please sign in to comment.