From: Eric Covener Date: Mon, 29 Dec 2014 21:05:56 +0000 (+0000) Subject: PR 56603: Inappropiate ProxyPassReverse match when interpolated URL X-Git-Tag: 2.5.0-alpha~3581 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c54599cf61e3c4247b8d5891379e7dc84179a6b8;p=apache PR 56603: Inappropiate ProxyPassReverse match when interpolated URL is empty string Submitted By: Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1648433 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2049ac8564..c6b600ccbd 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_proxy: Prevent ProxyPassReverse from doing a substitution when + the URL parameter interpolates to an empty string. PR 56603. + [] + *) core: Configuration files with long lines and continuation characters are not read properly. PR 55910. [Manuel Mausz ] diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 85d29b1749..624d1ad3bf 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -933,7 +933,7 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r, part = url; } } - if (l1 >= l2 && strncasecmp(real, part, l2) == 0) { + if (l2 > 0 && l1 >= l2 && strncasecmp(real, part, l2) == 0) { u = apr_pstrcat(r->pool, ent[i].fake, &part[l2], NULL); return ap_is_url(u) ? u : ap_construct_url(r->pool, u, r); }