]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy: Don't canonicalize with both nocanon and ProxyPassInterpolateEnv On.
authorYann Ylavic <ylavic@apache.org>
Tue, 7 Sep 2021 10:16:03 +0000 (10:16 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 7 Sep 2021 10:16:03 +0000 (10:16 +0000)
If nocanon is set, we should match the unparsed_uri against the interpolated
alias (not the ProxyPass'ed one) when verifying the resulting length. Otherwise
we falsely restore the canonicalized URL in case of mismatch.  PR 65549.

Submitted by: Joel Self <joelself gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893016 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/proxy_nocanon_interpolate.txt [new file with mode: 0644]
modules/proxy/mod_proxy.c

diff --git a/changes-entries/proxy_nocanon_interpolate.txt b/changes-entries/proxy_nocanon_interpolate.txt
new file mode 100644 (file)
index 0000000..a2b033c
--- /dev/null
@@ -0,0 +1,3 @@
+  *) mod_proxy: Do not canonicalize the proxied URL when both "nocanon" and
+     "ProxyPassInterpolateEnv On" are configured.  PR 65549.
+     [Joel Self <joelself gmail.com>]
\ No newline at end of file
index 1f5a4b6a861fd83f3aaf3ce61bbef7cbdf6178e6..a4b0ce894c2caca637e0229b088f457c873b99df 100644 (file)
@@ -949,7 +949,7 @@ PROXY_DECLARE(int) ap_proxy_trans_match(request_rec *r, struct proxy_alias *ent,
                               "'%s'; declining", r->uri);
                 return DECLINED;
             }
-            if (nocanon && len != alias_match(r->unparsed_uri, ent->fake)) {
+            if (nocanon && len != alias_match(r->unparsed_uri, fake)) {
                 mismatch = 1;
                 use_uri = r->uri;
             }