From 63d84df73f405573b9a998948be80b2f6a400e53 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Mon, 20 Jul 2020 22:53:35 +0000 Subject: [PATCH] fuzz: fix oss-fuzz crash in route_fuzz_test due to validation (#12176) Signed-off-by: Arthur Yan Mirrored from https://github.com/envoyproxy/envoy @ e355c58dcf6519e5a55c84e9efd50d597e3b5a69 --- envoy/config/route/v3/route_components.proto | 4 +++- envoy/config/route/v4alpha/route_components.proto | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/envoy/config/route/v3/route_components.proto b/envoy/config/route/v3/route_components.proto index e4ad52e6..c35e2106 100644 --- a/envoy/config/route/v3/route_components.proto +++ b/envoy/config/route/v3/route_components.proto @@ -127,7 +127,9 @@ message VirtualHost { // Specifies a list of HTTP headers that should be removed from each response // handled by this virtual host. - repeated string response_headers_to_remove = 11; + repeated string response_headers_to_remove = 11 [(validate.rules).repeated = { + items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} + }]; // Indicates that the virtual host has a CORS policy. CorsPolicy cors = 8; diff --git a/envoy/config/route/v4alpha/route_components.proto b/envoy/config/route/v4alpha/route_components.proto index 01b138c7..f921ea50 100644 --- a/envoy/config/route/v4alpha/route_components.proto +++ b/envoy/config/route/v4alpha/route_components.proto @@ -126,7 +126,9 @@ message VirtualHost { // Specifies a list of HTTP headers that should be removed from each response // handled by this virtual host. - repeated string response_headers_to_remove = 11; + repeated string response_headers_to_remove = 11 [(validate.rules).repeated = { + items {string {min_bytes: 1 well_known_regex: HTTP_HEADER_NAME strict: false}} + }]; // Indicates that the virtual host has a CORS policy. CorsPolicy cors = 8;