reject invalid branch specs
authorAndrew Dunstan <andrew@dunslane.net>
Tue, 12 Oct 2010 21:56:41 +0000 (21:56 +0000)
committerAndrew Dunstan <andrew@dunslane.net>
Tue, 12 Oct 2010 21:56:41 +0000 (21:56 +0000)
cgi-bin/pgstatus.pl

index 373d4f6b755e96acccef7aa42aaf7f9440d90c3c..8cafc4c8e5c7f80764dbab6a908b746f723c2c8b 100755 (executable)
@@ -62,6 +62,15 @@ unless ($animal && $ts && $stage && $sig)
        
 }
 
+unless ($branch =~ /^(HEAD|REL\d+_\d+_STABLE)$/)
+{
+        print
+            "Status: 492 bad branch parameter $branch\nContent-Type: text/plain\n\n",
+            "bad branch parameter $branch\n";
+        exit;
+
+}
+
 
 my $db = DBI->connect($dsn,$dbuser,$dbpass);