diff --git a/src/gitolite.pm b/src/gitolite.pm index 46d537c..c61a566 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -320,7 +320,7 @@ sub expand_wild $actual_repo =~ s/^\.\///; $actual_repo =~ s/\.git$//; # actual_repo has to match the pattern being expanded - next unless $actual_repo =~ /^$repo$/; + next unless $actual_repo =~ /$repo/; # if actual_repo is present "as is" in the config, those # permissions will override anything inherited from a # wildcard that also happens to match diff --git a/src/gl-auth-command b/src/gl-auth-command index 443bd8f..3d7eefc 100755 --- a/src/gl-auth-command +++ b/src/gl-auth-command @@ -115,7 +115,7 @@ if ($ENV{SSH_ORIGINAL_COMMAND} =~ $CUSTOM_COMMANDS) { my $cmd = $ENV{SSH_ORIGINAL_COMMAND}; my ($verb, $repo) = ($cmd =~ /^\s*(\S+)(?:\s+\/?(.*?)(?:.git)?)?$/); # deal with "no argument" cases - $verb eq 'expand' ? $repo = '.*' : die "$verb needs an argument\n" unless $repo; + $verb eq 'expand' ? $repo = '^' : die "$verb needs an argument\n" unless $repo; if ($repo =~ $REPONAME_PATT and $verb =~ /getperms|setperms/) { # with an actual reponame, you can "getperms" or "setperms" get_set_perms($repo_base_abs, $repo, $verb, $user);