about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-04 08:58:32 +0000
committerEric Wong <e@80x24.org>2019-06-04 10:06:18 +0000
commit7a8c54a0a90fce4c965b05769e10182388a84c31 (patch)
tree961d022c46742f27e9e7d77fa4fd0186e2fc27d9
parentd3906fed88f403552d1629e9ecc9974ab85abaae (diff)
downloadpublic-inbox-7a8c54a0a90fce4c965b05769e10182388a84c31.tar.gz
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.
-rw-r--r--lib/PublicInbox/GitHTTPBackend.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index e871bdde..a2a81f8e 100644
--- a/lib/PublicInbox/GitHTTPBackend.pm
+++ b/lib/PublicInbox/GitHTTPBackend.pm
@@ -51,8 +51,8 @@ sub serve {
 
         # 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;
         }