]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: disabled control characters and space in header names.
authorSergey Kandaurov <pluknet@nginx.com>
Tue, 10 Aug 2021 09:35:12 +0000 (12:35 +0300)
committerSergey Kandaurov <pluknet@nginx.com>
Tue, 10 Aug 2021 09:35:12 +0000 (12:35 +0300)
This is a follow up to 41f4bd4c51f1.

src/http/v3/ngx_http_v3_request.c

index f45a7b95e89173d1767401af6ac3f4e53518721f..1fcbad1de5449ac29769c63c57f3233fc42fe0d3 100644 (file)
@@ -428,7 +428,7 @@ ngx_http_v3_validate_header(ngx_http_request_t *r, ngx_str_t *name,
             continue;
         }
 
-        if (ch == '\0' || ch == LF || ch == CR || ch == ':'
+        if (ch <= 0x20 || ch == 0x7f || ch == ':'
             || (ch >= 'A' && ch <= 'Z'))
         {
             ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,