X-Git-Url: https://git.exim.org/buildfarm-server.git/blobdiff_plain/2e86f437603ee6977c9ca751e97e490ce2768584..7ab68349a8ff7a558e083e5cfda26d86d1e8856c:/cgi-bin/register.pl diff --git a/cgi-bin/register.pl b/cgi-bin/register.pl index 7013dea..3c42528 100755 --- a/cgi-bin/register.pl +++ b/cgi-bin/register.pl @@ -78,15 +78,44 @@ unless ($os && $osv && $comp && $compv && $arch && $email && $owner) # some idiot has a script that tries to talk to me # this should catch and dispose of him -if (grep {/\@pgbuildfarm\.org|Content-Type:|http:|mailto:|href=|None|Unknown/} $os,$osv,$comp,$compv,$arch,$email,$owner) +if (grep {/rgergerger|\@pgbuildfarm\.org|Content-Type:|http:|mailto:|href=|None|Unknown/} $os,$osv,$comp,$compv,$arch,$email,$owner) { print "Status: 403 Forbidden - go away idiot\n", "Content-Type: text/plain\n\n"; - exit; - + exit; } +# count transitions to and from upper case +my $trans = 1; +my $counttrans = 0; +foreach (split "" ,"$os$osv$comp$compv$arch$owner") +{ + if (/[A-Z]/) + { + next if $trans; + $trans = 1; + $counttrans++; + } + else + { + next unless $trans; + $trans = 0; + $counttrans++; + } +} + +# reject junk with too many transitions into/outof upper case +if ($counttrans > 20) +{ + print + "Status: 403 Forbidden - go away idiot\n", + "Content-Type: text/plain\n\n"; + exit; +} + + + my $secret = ""; my $dummyname=""; # we'll select an animal name when we approve it. foreach (1..8)