From: Jeff Trawick Date: Thu, 2 Sep 2004 19:49:21 +0000 (+0000) Subject: handling of encoded non-slashes was borked in the X-Git-Tag: 2.1.1~372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3df20e742a36a71174c1ac77c068ff1ae5645ed4;p=thirdparty%2Fapache%2Fhttpd.git handling of encoded non-slashes was borked in the AllowEncodedSlashes path thanks to FirstBill for pointing that out! git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104937 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 17430941ca6..a412477759c 100644 --- a/CHANGES +++ b/CHANGES @@ -13,7 +13,7 @@ Changes with Apache 2.1.0-dev *) Fix the handling of URIs containing %2F when AllowEncodedSlashes is enabled. Previously, such urls would still be rejected with - 404. [Jeff Trawick] + 404. [Jeff Trawick, Bill Stoddard] *) mod_rewrite: Fix query string handling for proxied URLs. PR 14518. [michael teitler , diff --git a/server/util.c b/server/util.c index 24a878baeee..231bc9adb9f 100644 --- a/server/util.c +++ b/server/util.c @@ -1581,16 +1581,12 @@ AP_DECLARE(int) ap_unescape_url_keep2f(char *url) else { char decoded; decoded = x2c(y + 1); - if (!IS_SLASH(decoded)) { - *x++ = *y++; - *x = *y; + if (decoded == '\0') { + badpath = 1; } else { *x = decoded; y += 2; - if (decoded == '\0') { - badpath = 1; - } } } }