]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Revert to old behaviour: Even if we detect a bad character: Formally decode
authorRuediger Pluem <rpluem@apache.org>
Tue, 25 Dec 2007 09:35:05 +0000 (09:35 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 25 Dec 2007 09:35:05 +0000 (09:35 +0000)
  string correctly and do not mess up the string. Let the caller decide what
  it wants to do with the result according to our return code.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@606776 13f79535-47bb-0310-9956-ffa450edef68

server/util.c

index df806aa384afb962ffa3bcb534e8fef228b01903..eede00530852acb3bcdaa304bbfc772f4e6501e9 100644 (file)
@@ -1578,6 +1578,8 @@ static int unescape_url(char *url, const char *forbid, const char *reserved)
                 if ((decoded == '\0')
                     || (forbid && ap_strchr_c(forbid, decoded))) {
                     badpath = 1;
+                    *x = decoded;
+                    y += 2;
                 }
                 else if (reserved && ap_strchr_c(reserved, decoded)) {
                     *x++ = *y++;