mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
Merge branch 'js/gitweb-path-info-unquote'
"gitweb" when used with PATH_INFO failed to notice directories with SP (and other characters that need URL-style quoting) in them. * js/gitweb-path-info-unquote: gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO
This commit is contained in:
commit
92cdcc5284
|
@ -54,6 +54,11 @@ sub evaluate_uri {
|
|||
# to build the base URL ourselves:
|
||||
our $path_info = decode_utf8($ENV{"PATH_INFO"});
|
||||
if ($path_info) {
|
||||
# $path_info has already been URL-decoded by the web server, but
|
||||
# $my_url and $my_uri have not. URL-decode them so we can properly
|
||||
# strip $path_info.
|
||||
$my_url = unescape($my_url);
|
||||
$my_uri = unescape($my_uri);
|
||||
if ($my_url =~ s,\Q$path_info\E$,, &&
|
||||
$my_uri =~ s,\Q$path_info\E$,, &&
|
||||
defined $ENV{'SCRIPT_NAME'}) {
|
||||
|
|
Loading…
Reference in a new issue