We mainly support git-upload-pack; and maybe somebody uses
git-receive-pack with this. Perhaps other (experimental)
command names are acceptable. But it's unlikely anybody will
want Unicode command names for git services.
# Documentation/technical/http-protocol.txt in git.git
# requires one and exactly one query parameter:
- if ($env->{QUERY_STRING} =~ /\Aservice=git-\w+-pack\z/ ||
- $path =~ /\Agit-\w+-pack\z/) {
+ if ($env->{QUERY_STRING} =~ /\Aservice=git-[A-Za-z0-9_]+-pack\z/ ||
+ $path =~ /\Agit-[A-Za-z0-9_]+-pack\z/) {
my $ok = serve_smart($env, $git, $path);
return $ok if $ok;
}