From: Gerrit Pape Date: Tue, 26 Jan 2010 14:47:16 GMT Subject: [PATCH] git-cvsserver: allow regex metacharacters in CVSROOT Message-ID: <20100126144716.15009.qmail@2f965a5eeec988.315fe32.mid.smarden.org> 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 --- git-cvsserver.perl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 2804106..13751db 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -408,7 +408,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/ ); -- 1.6.6