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>
This commit is contained in:
parent
35eabd1579
commit
f9acaeae88
@ -388,7 +388,7 @@ sub req_Directory
|
|||||||
$state->{localdir} = $data;
|
$state->{localdir} = $data;
|
||||||
$state->{repository} = $repository;
|
$state->{repository} = $repository;
|
||||||
$state->{path} = $repository;
|
$state->{path} = $repository;
|
||||||
$state->{path} =~ s/^$state->{CVSROOT}\///;
|
$state->{path} =~ s/^\Q$state->{CVSROOT}\E\///;
|
||||||
$state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//);
|
$state->{module} = $1 if ($state->{path} =~ s/^(.*?)(\/|$)//);
|
||||||
$state->{path} .= "/" if ( $state->{path} =~ /\S/ );
|
$state->{path} .= "/" if ( $state->{path} =~ /\S/ );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user