diff options
author | martin f. krafft <madduck@madduck.net> | 2008-04-20 23:03:56 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-21 23:30:11 -0700 |
commit | bbd4c307fc315847c975efd4c9aa32eb0e8470fb (patch) | |
tree | 988cdac57962113557c1c045319364fe2f7d437c /gitweb | |
parent | bash: Add completion for git diff --base --ours --theirs (diff) | |
download | tgif-bbd4c307fc315847c975efd4c9aa32eb0e8470fb.tar.xz |
Escape project name in regexp
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>
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 746153ffe8..4abd7ac1ad 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -506,7 +506,7 @@ sub evaluate_path_info { } # 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/" |