]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fix a problem in mod_rewrite which would lead to 400 Bad Request
authorMartin Kraemer <martin@apache.org>
Wed, 29 May 2002 17:39:23 +0000 (17:39 +0000)
committerMartin Kraemer <martin@apache.org>
Wed, 29 May 2002 17:39:23 +0000 (17:39 +0000)
responses for rewriting rules which resulted in a local path.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95357 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/modules/standard/mod_rewrite.c

index 9eeef5751121f34fc419512f68ad4548235972b2..076285363603cbcf80f9d911c9f1e219f30a97a6 100644 (file)
@@ -1,5 +1,9 @@
 Changes with Apache 1.3.25
 
+  *) Fix a problem in mod_rewrite which would lead to 400 Bad Request
+     responses for rewriting rules which resulted in a local path.
+     [Martin Kraemer]
+
   *) Disallow anything but whitespace on the request line after the
      HTTP/x.y protocol string. That prevents arbitrary user input
      from ending up in the access_log and error_log. Also, special
index 729b2fa39a5f68fcbd8ab63e2cc53cf9a6aa00ee..cf8e48b38064eb1d007282bb743c8ca951d000a5 100644 (file)
@@ -1220,7 +1220,7 @@ static int hook_uri2file(request_rec *r)
             rewritelog(r, 2, "local path result: %s", r->filename);
 
             /* the filename has to start with a slash! */
-            if (ap_os_is_path_absolute(r->filename)) {
+            if (!ap_os_is_path_absolute(r->filename)) {
                 return BAD_REQUEST;
             }
 
@@ -1505,7 +1505,7 @@ static int hook_fixup(request_rec *r)
             }
 
             /* the filename has to start with a slash! */
-            if (ap_os_is_path_absolute(r->filename)) {
+            if (!ap_os_is_path_absolute(r->filename)) {
                 return BAD_REQUEST;
             }