From: Jim Jagielski Date: Thu, 4 Aug 2005 17:07:57 +0000 (+0000) Subject: mod_proxy: Fix over-eager handling of '%' for reverse proxies. PR 29554. X-Git-Tag: 2.0.55~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3aae66892196fcf50c3290f14ece46beaa2c3883;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy: Fix over-eager handling of '%' for reverse proxies. PR 29554. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@227435 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index b5293b51d90..1cae6546905 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.0.55 + *) mod_proxy: Fix over-eager handling of '%' for reverse proxies. + PR 29554. [Jim Jagielski] + *) mod_ldap: Fix a possible crash in shared memory cache handling. PR 34209. [Joe Orton] diff --git a/STATUS b/STATUS index a35e02c95a1..d81c8c51d43 100644 --- a/STATUS +++ b/STATUS @@ -191,14 +191,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ please append new backports at the end of this list not the top. ] - *) ap_proxy_canonenc() is over-eager in handling '%' for reverse - proxies (PR: 29554). - Index: modules/proxy/proxy_util.c - - if (isenc && ch == '%') { - + if (isenc && (isenc != PROXYREQ_REVERSE) && ch == '%') { - - +1: jim, pquerna, wrowe - *) several changes to improve logging of connection-oriented errors, including ap_log_cerror() API (needs minor bump in addition to changes below) http://cvs.apache.org/viewcvs.cgi/httpd-2.0/server/core.c?r1=1.289&r2=1.291 diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 77ec80a5689..61ad91f6987 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -161,7 +161,7 @@ PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, en continue; } /* decode it if not already done */ - if (isenc && ch == '%') { + if (isenc && (isenc != PROXYREQ_REVERSE) && (ch == '%')) { if (!apr_isxdigit(x[i + 1]) || !apr_isxdigit(x[i + 2])) return NULL; ch = ap_proxy_hex2c(&x[i + 1]);