summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f457413)
raw | patch | inline | side by side (parent: f457413)
author | martin f. krafft <madduck@madduck.net> | |
Sun, 20 Apr 2008 21:03:56 +0000 (23:03 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 22 Apr 2008 06:30:11 +0000 (23:30 -0700) |
The project name, when used in a regular expression, needs to be quoted
properly, so that stuff like '++' in the project name does not cause
Perl to barf.
Related info: http://bugs.debian.org/476076
This is a bug in Perl's CGI.pm, but fixing that exposed a similar bug in
gitweb.perl
Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
properly, so that stuff like '++' in the project name does not cause
Perl to barf.
Related info: http://bugs.debian.org/476076
This is a bug in Perl's CGI.pm, but fixing that exposed a similar bug in
gitweb.perl
Signed-off-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 746153ffe8fb020db4f6a4aafe779848b5260bb7..4abd7ac1adae1bb166d239e5efe75bebaf8110d7 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
}
# do not change any parameters if an action is given using the query string
return if $action;
- $path_info =~ s,^$project/*,,;
+ $path_info =~ s,^\Q$project\E/*,,;
my ($refname, $pathname) = split(/:/, $path_info, 2);
if (defined $pathname) {
# we got "project.git/branch:filename" or "project.git/branch:dir/"