X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=blobdiff_plain;f=yarrg%2Fcommod-update-receiver;h=2059ad792416710584c279eb1d2de63032220339;hp=0ae5ba8a8560a025b452c596ec9bad9be9458c06;hb=HEAD;hpb=9f2bf0795621de264cea63060079704dfd9d5a0b diff --git a/yarrg/commod-update-receiver b/yarrg/commod-update-receiver index 0ae5ba8..0258a51 100755 --- a/yarrg/commod-update-receiver +++ b/yarrg/commod-update-receiver @@ -25,12 +25,16 @@ # are used without permission. This program is not endorsed or # sponsored by Three Rings. +BEGIN { unshift @INC, qw(.) } + use strict (qw(vars)); use POSIX; use MIME::Entity; use Commods; +no warnings qw(exec); + $CGI::POST_MAX= 3*1024*1024; use CGI qw/:standard -private_tempfiles/; @@ -93,7 +97,7 @@ addlog("receiving"); $o{'clientname'}= must_param('clientname',$re_any); my $clientinfo= $clients{$o{'clientname'}}; -fail('unknown client') unless defined $clientinfo; +fail('unknown client '.errsan($o{'clientname'})) unless defined $clientinfo; my $clientfixes= must_param('clientfixes', "^([-0-9a-z ]*)\$"); my @clientfixes= sort grep { m/./ } split /\s+/, $clientfixes; @@ -115,7 +119,7 @@ $o{'ocean'}= must_param('ocean', $re_any); $o{'island'}= must_param('island', $re_any); my $arches= $oceans{$o{'ocean'}}; -fail("unknown ocean") unless $arches; +fail("unknown ocean ".errsan($o{'ocean'})) unless $arches; parse_info_serverside_ocean($o{'ocean'}); @@ -126,7 +130,7 @@ foreach my $islands (values %$arches) { die if $island_found; $island_found= $sources; } -fail("unknown island") unless $island_found; +fail("unknown island ".errsan($o{'island'})) unless $island_found; $o{'timestamp'}= must_param('timestamp', "^([1-9]\\d{1,20})\$"); fail("clock skew") if $o{'timestamp'} > $now;