Restrict duplicate TE headers in HTTP/2 and HTTP/3

Following d3a76322cf, this change rejects requests which have multiple
TE headers.

Reported-by: geeknik <geeknik@protonmail.ch>
This commit is contained in:
Roman Arutyunyan authored and Roman Arutyunyan committed 2026-04-16 19:47:03 +04:00
1 parent ff8221b4db
commit 4e89ce224f
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -3849,7 +3849,8 @@ ngx_http_v2_run_request(ngx_http_request_t *r)
}
if (r->headers_in.te
&& (r->headers_in.te->value.len != 8
&& (r->headers_in.te->next
|| r->headers_in.te->value.len != 8
|| ngx_strncasecmp(r->headers_in.te->value.data,
(u_char *) "trailers", 8) != 0))
{
+2 -1
View File
@@ -1050,7 +1050,8 @@ ngx_http_v3_process_request_header(ngx_http_request_t *r)
}
if (r->headers_in.te
&& (r->headers_in.te->value.len != 8
&& (r->headers_in.te->next
|| r->headers_in.te->value.len != 8
|| ngx_strncasecmp(r->headers_in.te->value.data,
(u_char *) "trailers", 8) != 0))
{