From: William A. Rowe Jr Date: Thu, 25 Aug 2016 02:45:18 +0000 (+0000) Subject: Also catch invalid spaces between the URI <> Protocol in StrictWhitespace mode. X-Git-Tag: 2.5.0-alpha~1208 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c14736b0ac6626036d86abcd9fac387c3d53f284;p=thirdparty%2Fapache%2Fhttpd.git Also catch invalid spaces between the URI <> Protocol in StrictWhitespace mode. (matching the test for the Method <> URI) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757593 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index 9eab47bb545..a6857449a9d 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -707,6 +707,12 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb) goto rrl_done; } + /* Verify uri terminated with a single SP, otherwise mark in error */ + if (strictspaces && ll[0] && (ll[0] != ' ' || apr_isspace(ll[1])) + && deferred_error == rrl_none) { + deferred_error = rrl_excesswhitespace; + } + /* Advance protocol pointer over leading whitespace, * then NUL terminate the uri string */