Mailing List Archive

[6.0] e301d5fc9 hpack: Remove redundant/incorrect header validation
commit e301d5fc918a834499e2bd3eddc82e282b951219
Author: Walid Boudebouda <walid.boudebouda@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@gmail.com>

diff --git a/bin/varnishd/http2/cache_http2_hpack.c b/bin/varnishd/http2/cache_http2_hpack.c
index 4a1140291..4d3a8819c 100644
--- a/bin/varnishd/http2/cache_http2_hpack.c
+++ b/bin/varnishd/http2/cache_http2_hpack.c
@@ -73,12 +73,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",
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit