Skip to content

Commit f9acaea

Browse files
g-papegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 35eabd1 commit f9acaea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-cvsserver.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ sub req_Directory
388388
$state->{localdir} = $data;
389389
$state->{repository} = $repository;
390390
$state->{path} = $repository;
391-
$state->{path} =~ s/^$state->{CVSROOT}\///;
391+
$state->{path} =~ s/^\Q$state->{CVSROOT}\E\///;
392392
$state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//);
393393
$state->{path} .= "/" if ( $state->{path} =~ /\S/ );
394394

0 commit comments

Comments
 (0)