]> git.kaiwu.me - nginx.git/commit
Autoindex: escape '?' in file names.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 11 Oct 2011 17:56:51 +0000 (17:56 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 11 Oct 2011 17:56:51 +0000 (17:56 +0000)
commit6226fe3512ca9364b1ec98519458e61eea9c5dff
tree7dea051f36d452e3475589b4f47335ee14b275de
parente3d6c5a33cd31a788c345e6c936852db0805bb6d
Autoindex: escape '?' in file names.

For files with '?' in their names autoindex generated links with '?' not
escaped.  This resulted in effectively truncated links as '?' indicates
query string start.

This is an updated version of the patch originally posted at [1].  It
introduces generic NGX_ESCAPE_URI_COMPONENT which escapes everything but
unreserved characters as per RFC 3986.  This approach also renders unneeded
special colon processing (as colon is percent-encoded now), it's dropped
accordingly.

[1] http://nginx.org/pipermail/nginx-devel/2010-February/000112.html

Reported by Konstantin Leonov.
src/core/ngx_string.c
src/core/ngx_string.h
src/http/modules/ngx_http_autoindex_module.c