Skip to content

Commit

Permalink
Improved detection of broken percent encoding in URI.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdocguard committed Oct 8, 2019
1 parent f7999fe commit 2ac24f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/http/ngx_http_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -1561,6 +1561,10 @@ ngx_http_parse_complex_uri(ngx_http_request_t *r, ngx_uint_t merge_slashes)
}
}

if (state == sw_quoted || state == sw_quoted_second) {
return NGX_HTTP_PARSE_INVALID_REQUEST;
}

done:

r->uri.len = u - r->uri.data;
Expand Down

0 comments on commit 2ac24f1

Please sign in to comment.