]> granicus.if.org Git - apache/commitdiff
Merge r1648433 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 12 Jan 2015 13:59:22 +0000 (13:59 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 12 Jan 2015 13:59:22 +0000 (13:59 +0000)
PR 56603:  Inappropiate ProxyPassReverse match when interpolated URL
is empty string

Submitted By: <ajprout hotmail.com>
Committed By: covener

Submitted by: covener
Reviewed/backported by: jim

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

CHANGES
STATUS
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index bc1cca8d0eaaff2f5c35d3f79a571e2bd06aabf1..5cfa3c86a406e1b300b70dc7f8a793c00d8efd95 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,10 @@ Changes with Apache 2.4.11
      request headers earlier.  Adds "MergeTrailers" directive to restore
      legacy behavior.  [Edward Lu, Yann Ylavic, Joe Orton, Eric Covener]
 
+  *) mod_proxy: Prevent ProxyPassReverse from doing a substitution when
+     the URL parameter interpolates to an empty string. PR 56603.
+     [<ajprout hotmail.com>]
+
   *) core: Fix -D[efined] or <Define>[d] variables lifetime accross restarts. 
      PR 57328.  [Armin Abfalterer <a.abfalterer gmail.com>, Yann Ylavic].
 
diff --git a/STATUS b/STATUS
index c7207a1e0a76dc8646d0ea234d0b100d6ea1858c..378d273fc264a50910b18b035ac53aa5e3398351 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -110,12 +110,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: https://issues.apache.org/bugzilla/attachment.cgi?id=32209
      +1: druggeri, gsmith, rjung
 
-   * mod_proxy: Inappropiate ProxyPassReverse match when interpolated URL is 
-     empty string. PR56603
-     trunk patch: http://svn.apache.org/r1648433
-     2.4.x patch: trunk works
-     +1 covener, rjung, jim
-
    * split-logfile: Fix perl strict refs error PR56329.
      trunk patch: 1648719
      2.4.x patch: trunks works
index 9d8265a293e7120cf85b0c90616f9f857da1aed4..5809c02094bbb30174a3df423bd422d7e2d69d85 100644 (file)
@@ -940,7 +940,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);
             }