]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1918550 from trunk:
authorEric Covener <covener@apache.org>
Mon, 24 Jun 2024 17:52:31 +0000 (17:52 +0000)
committerEric Covener <covener@apache.org>
Mon, 24 Jun 2024 17:52:31 +0000 (17:52 +0000)
mod_proxy: escape for non-proxypass configuration

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

modules/proxy/mod_proxy.c

index c9cef7c44f53aba51c0031b04080933de6e30167..17e39c95b8fedb93371d758f5eadb1a0dcba670b 100644 (file)
@@ -1314,15 +1314,18 @@ static int proxy_handler(request_rec *r)
     }
 
     if (!r->proxyreq) {
+        rc = DECLINED;
         /* We may have forced the proxy handler via config or .htaccess */
         if (r->handler &&
             strncmp(r->handler, "proxy:", 6) == 0 &&
             strncmp(r->filename, "proxy:", 6) != 0) {
             r->proxyreq = PROXYREQ_REVERSE;
             r->filename = apr_pstrcat(r->pool, r->handler, r->filename, NULL);
+            /* Still need to fixup/canonicalize r->filename */
+            rc = proxy_fixup(r);
         }
-        else {
-            return DECLINED;
+        if (rc != OK) {
+            return rc;
         }
     } else if (strncmp(r->filename, "proxy:", 6) != 0) {
         return DECLINED;