[7.3] 06f04eceb hpack: Remove redundant/incorrect header validation

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Oct 24 15:08:14 UTC 2023


commit 06f04eceb1af53db7b38d3d4d19a2300c63ee2be
Author: Walid Boudebouda <walid.boudebouda at gmail.com>
Date:   Fri Sep 8 17:13:19 2023 +0200

    hpack: Remove redundant/incorrect header validation
    
    Control characters will be caught by vct_ishdrval() anyways, but this
    condition would also reject allowed obs-text non-ASCII characters.
    
    Signed-off-by: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>

diff --git a/bin/varnishd/http2/cache_http2_hpack.c b/bin/varnishd/http2/cache_http2_hpack.c
index 74e1d8520..9c179064b 100644
--- a/bin/varnishd/http2/cache_http2_hpack.c
+++ b/bin/varnishd/http2/cache_http2_hpack.c
@@ -75,12 +75,6 @@ h2h_checkhdr(const struct http *hp, const char *b, size_t namelen, size_t len)
 				break;
 			/* FALL_THROUGH */
 		case FLD_NAME:
-			if (*p <= 0x20 || *p >= 0x7f) {
-				VSLb(hp->vsl, SLT_BogoHeader,
-				    "Illegal field header name (control): %.*s",
-				    (int)(len > 20 ? 20 : len), b);
-				return (H2SE_PROTOCOL_ERROR);
-			}
 			if (isupper(*p)) {
 				VSLb(hp->vsl, SLT_BogoHeader,
 				    "Illegal field header name (upper-case): %.*s",


More information about the varnish-commit mailing list