From f9acaeae880feb87ae52e719aab930bf1f3e8413 Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Tue, 26 Jan 2010 14:47:16 +0000 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- git-cvsserver.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/ );