From 856b7224f13ab1eee3766bd4f6ce07588cc78476 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Tue, 12 Oct 2010 21:56:41 +0000 Subject: [PATCH] reject invalid branch specs --- cgi-bin/pgstatus.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cgi-bin/pgstatus.pl b/cgi-bin/pgstatus.pl index 373d4f6..8cafc4c 100755 --- a/cgi-bin/pgstatus.pl +++ b/cgi-bin/pgstatus.pl @@ -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); -- 2.30.2