]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Also catch invalid spaces between the URI <> Protocol in StrictWhitespace mode.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 25 Aug 2016 02:45:18 +0000 (02:45 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 25 Aug 2016 02:45:18 +0000 (02:45 +0000)
(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

server/protocol.c

index 9eab47bb545c60242bc3c47ebee43bb0a3af7cf9..a6857449a9dbff7bdc6ce0cc7d5f3d2c51207005 100644 (file)
@@ -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
      */