Skip to content

Commit

Permalink
git-cvsserver: allow regex metacharacters in CVSROOT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gerrit Pape authored and Junio C Hamano committed Jan 26, 2010
1 parent 35eabd1 commit f9acaea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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/ );

Expand Down

0 comments on commit f9acaea

Please sign in to comment.