changeset 7577:5a3426683251

Improved detection of broken percent encoding in URI.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 08 Oct 2019 21:56:14 +0300
parents 7fdcf308e0f0
children 79bcbe7cd3f2
files src/http/ngx_http_parse.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_parse.c
+++ b/src/http/ngx_http_parse.c
@@ -1561,6 +1561,10 @@ ngx_http_parse_complex_uri(ngx_http_requ
         }
     }
 
+    if (state == sw_quoted || state == sw_quoted_second) {
+        return NGX_HTTP_PARSE_INVALID_REQUEST;
+    }
+
 done:
 
     r->uri.len = u - r->uri.data;