Proxy: reject empty header names in HTTP/2

These are malformed.
This commit is contained in:
Demi Marie Obenour 2025-12-11 12:24:56 -05:00
parent 282fe912a6
commit a60966786d
1 changed files with 4 additions and 0 deletions

View File

@ -3246,6 +3246,10 @@ ngx_http_proxy_v2_validate_header_name(ngx_http_request_t *r, ngx_str_t *s)
u_char ch;
ngx_uint_t i;
if (s->len < 1) {
return NGX_ERROR;
}
for (i = 0; i < s->len; i++) {
ch = s->data[i];