summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2010-01-26 14:47:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-01-26 20:54:18 (GMT)
commitf9acaeae880feb87ae52e719aab930bf1f3e8413 (patch)
tree347366f714fb442fd085a1f697305f61d39effdb
parent35eabd1579726d594e84fc8328a5c87693dd065a (diff)
downloadgit-f9acaeae880feb87ae52e719aab930bf1f3e8413.zip
git-f9acaeae880feb87ae52e719aab930bf1f3e8413.tar.gz
git-f9acaeae880feb87ae52e719aab930bf1f3e8413.tar.bz2
git-cvsserver: allow regex metacharacters in CVSROOT
When run in a repository with a path name containing regex metacharacters (e.g. +), git-cvsserver failed to split the client request into CVSROOT and module. Now metacharacters are disabled for the value of CVSROOT in the perl regex so that directory names containing metacharacters are handled properly. Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xgit-cvsserver.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 6dc45f5..046f557 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -388,7 +388,7 @@ sub req_Directory
$state->{localdir} = $data;
$state->{repository} = $repository;
$state->{path} = $repository;
- $state->{path} =~ s/^$state->{CVSROOT}\///;
+ $state->{path} =~ s/^\Q$state->{CVSROOT}\E\///;
$state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//);
$state->{path} .= "/" if ( $state->{path} =~ /\S/ );