]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1837250 from trunk:
authorJim Jagielski <jim@apache.org>
Wed, 7 Nov 2018 15:18:42 +0000 (15:18 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 7 Nov 2018 15:18:42 +0000 (15:18 +0000)
If ProxyPassReverse is used for reverse mapping of relative redirects, subsequent ProxyPassReverse statements, whether they are relative or absolute, may fail.

PR 60408 [Peter Haworth <pmh1wheel gmail.com>]
Submitted by: jailletc36
Reviewed by: jailletc36, rpluem, jim

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

CHANGES
STATUS
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 519ee2a1c5019d1f8c0716655acc4f67266d6fdd..6e2dba0e66f418843cfb0daa60e2acb7df04644b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.38
 
+  *) mod_proxy: If ProxyPassReverse is used for reverse mapping of relative
+     redirects, subsequent ProxyPassReverse statements, whether they are
+     relative or absolute, may fail.  PR 60408.  [Peter Haworth <pmh1wheel gmail.com>]
+
 Changes with Apache 2.4.37
 
   *) mod_ssl: Fix HTTP/2 failures when using OpenSSL 1.1.1. [Rainer Jung]
diff --git a/STATUS b/STATUS
index 5954d512c1223a38074baf29f059cd75f335c380..3b4982d1f4b54e89e7fa0f2b4113776c94cf9cb6 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -126,12 +126,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  *) mod_proxy: If ProxyPassReverse is used for reverse mapping of relative
-                redirects, subsequent ProxyPassReverse statements, whether they
-                are relative or absolute, may fail.  PR 60408
-     trunk patch: http://svn.apache.org/r1837250
-     2.4.x patch: svn merge -c 1837250 ^/httpd/httpd/trunk .
-     +1: jailletc36, rpluem, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index 6501c680649d50b1eedfcdd0b21f21ad97afffbc..cbf882677711a5aa1578b58518c75947fd8319c5 100644 (file)
@@ -837,7 +837,7 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
 {
     proxy_req_conf *rconf;
     struct proxy_alias *ent;
-    int i, l1, l2;
+    int i, l1, l1_orig, l2;
     char *u;
 
     /*
@@ -849,7 +849,7 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
         return url;
     }
 
-    l1 = strlen(url);
+    l1_orig = strlen(url);
     if (conf->interpolate_env == 1) {
         rconf = ap_get_module_config(r->request_config, &proxy_module);
         ent = (struct proxy_alias *)rconf->raliases->elts;
@@ -862,6 +862,10 @@ PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r,
             ap_get_module_config(r->server->module_config, &proxy_module);
         proxy_balancer *balancer;
         const char *real = ent[i].real;
+
+        /* Restore the url length, if it had been changed by the code below */
+        l1 = l1_orig;
+
         /*
          * First check if mapping against a balancer and see
          * if we have such a entity. If so, then we need to