X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=html%2Fdo-edit-scores.pl;fp=html%2Fdo-edit-scores.pl;h=be93df0536c9ef0871822406f37b1dd92bb1195a;hp=1ae15471634267a1ff51290d9395222c0d9e81a8;hb=a5bef5a751fddcaa09f7d4281e2452ea778436ca;hpb=3dacc418b78ba076587f93e8674cb9b5f55eab36 diff --git a/html/do-edit-scores.pl b/html/do-edit-scores.pl index 1ae1547..be93df0 100755 --- a/html/do-edit-scores.pl +++ b/html/do-edit-scores.pl @@ -24,6 +24,10 @@ for my $p ($cgi->param()) { undef $val if ($val =~ /^\s*$/); if ($p =~ /^score(\d+)-(\d+)/) { + if (defined($val) && ($val < 0 || $val > 10000)) { + ccbs::user_error("Alle poengsummer må være mellom 0 og 10000 (inklusive)."); + } + $dbh->do('UPDATE scores SET score=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef, $val, $tournament, $round, $group, $1, $2); } elsif ($p =~ /^playmode(\d+)-(\d+)/) {