git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mod_proxy_html and special characters


Hi Eric,

On 05/25/2018 06:57 PM, Eric Covener wrote:
<a href="http://internal/!%22%23$/";>A link with special characters</a>
>> ProxyHTMLURLMap "http://internal/!\"#$/"; "http://external/!\"#$/";

Is it reasonable to expect mod_proxy_html to rewrite URL encoded URLs as
well?
> IMO no, I don't think the literals in the first argument should be
expected to match the URL-encoded content

The reason I am asking this is, because for Location matching, Apache httpd apparently does map a request with a URL encoded path to the non-encoded configured path. For example, if I have configured in a virtual host:

  <Location "/!\"#$/">
    ProxyPass "http://internal/!\"#$/";
    ProxyHTMLURLMap "http://internal/!\"#$/"; "http://external/!\"#$/";
    ...
  </Location>

... then for matching the location container it does not matter whether the path of the request is URL encoded or not.

I consider this behavior a bit inconsistent. URL-encoded requests get proxied to the internal resource as if they were not URL-encoded. But URL-encoding a few characters in the path is sufficient to bypass HTML rewriting.

Regards,
Micha



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache2-developers/msg04107.html on line 108
Call Stack
#TimeMemoryFunctionLocation
10.0031364440{main}( ).../msg04107.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache2-developers/msg04107.html on line 108
Call Stack
#TimeMemoryFunctionLocation
10.0031364440{main}( ).../msg04107.html:0