From dab8c0e762c1315409b5bd0dc2e75fbc70b3bf1e Mon Sep 17 00:00:00 2001 From: Demi Marie Obenour Date: Fri, 25 Apr 2025 02:17:29 -0400 Subject: [PATCH] HTTP: Do not allow header lines with no colon RFC9112 does not permit them. --- src/http/ngx_http_parse.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 5cbe1257b..e2c908d32 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -956,13 +956,6 @@ ngx_http_parse_header_line(ngx_http_request_t *r, ngx_buf_t *b, break; } - if (ch == LF) { - r->header_name_end = p; - r->header_start = p; - r->header_end = p; - goto done; - } - if (!ngx_http_non_alnum_dash_header_char(ch)) { r->header_end = p; return NGX_HTTP_PARSE_INVALID_HEADER;