From: Yann Ylavic Date: Wed, 8 Sep 2021 08:27:47 +0000 (+0000) Subject: Merge r1893016 from trunk: X-Git-Tag: candidate-2.4.49-rc1~3^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c1ed8e820638411ad536d82e8ef4a23af09c510;p=thirdparty%2Fapache%2Fhttpd.git Merge r1893016 from trunk: mod_proxy: Don't canonicalize with both nocanon and ProxyPassInterpolateEnv On. 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 Reviewed by: ylavic, covener, rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1893111 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/changes-entries/proxy_nocanon_interpolate.txt b/changes-entries/proxy_nocanon_interpolate.txt new file mode 100644 index 00000000000..a2b033cbbf0 --- /dev/null +++ b/changes-entries/proxy_nocanon_interpolate.txt @@ -0,0 +1,3 @@ + *) mod_proxy: Do not canonicalize the proxied URL when both "nocanon" and + "ProxyPassInterpolateEnv On" are configured. PR 65549. + [Joel Self ] \ No newline at end of file diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 354bb8f660f..e38622fae70 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -943,7 +943,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; }