summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-10 15:31:06 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-10 15:31:06 -0700
commite3f26752b5e9d38e88a09671d124b61fb0cd5dbf (patch)
treefb5b5d9bc1c17bb827d97e4896d66a40c42de1ff /gitweb
parent871e293c9acbeaacce59dcd98fab6028f552f5be (diff)
parent9a8eea9604ade731c3d0ff10136f2ae81b2a13c8 (diff)
downloadgit-e3f26752b5e9d38e88a09671d124b61fb0cd5dbf.tar.gz
Merge branch 'maint-1.7.11' into maint
* maint-1.7.11: Almost 1.7.11.6 gitweb: URL-decode $my_url/$my_uri when stripping PATH_INFO rebase -i: use full onto sha1 in reflog sh-setup: protect from exported IFS receive-pack: do not leak output from auto-gc to standard output t/t5400: demonstrate breakage caused by informational message from prune setup: clarify error messages for file/revisions ambiguity send-email: improve RFC2047 quote parsing fsck: detect null sha1 in tree entries do not write null sha1s to on-disk index diff: do not use null sha1 as a sentinel value
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 3d6a705388..7f8c1878d4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -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'}) {