[7.4] 836eae3c8 hpack: Remove redundant/incorrect header validation
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Mon Oct 23 17:18:11 UTC 2023
commit 836eae3c8a3da966f4de8bf6f829ede7913fe235
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 92befad53..b5451eb22 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