diff options
author | Gerrit Pape <pape@smarden.org> | 2010-01-26 14:47:16 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-26 12:54:18 -0800 |
commit | f9acaeae880feb87ae52e719aab930bf1f3e8413 (patch) | |
tree | 347366f714fb442fd085a1f697305f61d39effdb /git-cvsserver.perl | |
parent | 35eabd1579726d594e84fc8328a5c87693dd065a (diff) | |
download | git-f9acaeae880feb87ae52e719aab930bf1f3e8413.tar.gz |
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>
Diffstat (limited to 'git-cvsserver.perl')
-rwxr-xr-x | git-cvsserver.perl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 6dc45f5d45..046f5578a1 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/ ); |