]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Allow for URI-path pre_translate_name before (and/or instead of) decoding.
authorYann Ylavic <ylavic@apache.org>
Mon, 22 Jun 2020 10:36:55 +0000 (10:36 +0000)
committerYann Ylavic <ylavic@apache.org>
Mon, 22 Jun 2020 10:36:55 +0000 (10:36 +0000)
commit6b3b91a616b4848ee134ef902c785a7b2c0dd453
tree25dfa0408c8cf68f8fcb8dc6467a28a406e53b32
parentdc55d74fe008b846bf351c454f88d50b85c81dfa
Allow for URI-path pre_translate_name before (and/or instead of) decoding.

Apply minimal normalization (AP_NORMALIZE_DECODE_UNRESERVED) first in
ap_process_request_internal() before running pre_translate_name hooks,
such that the hooks can work with undecoded r->uri.

Only if no hook takes "ownership" of the URI (returning OK), apply
percent decoding for the rest of request handling. Otherwise r->uri remains
encoded meaning that further location/directory/file/if/.. sections (walks)
should that into account.

Since normalization now happens before decoding, we might have to
re-normalize after decoding if "AllowEncodedSlahes on" transformed any
"%2F" sequence to "/", potentially creating new "/./" or "/../" sequences.

Note that for (lookup) subrequests, the path may be relative so we have
to allow for that.

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