]> iEval git - gruntmaster-page.git/commitdiff
Restrict submit size to 25KB
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 27 Feb 2014 14:50:20 +0000 (16:50 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 27 Feb 2014 15:06:12 +0000 (17:06 +0200)
(cherry picked from commit fcd3a29c3144870f2a418a0dbf6093da26e6709f)

lib/Gruntmaster/Page/Submit.pm

index a30263bbba5186ffc9fd58ce5b604f66878d9e1b..aeffb08df4e56401ba96d349477534d121fdc9b0 100644 (file)
@@ -33,6 +33,7 @@ sub generate{
        die if defined $contest && $contest !~ /^\w+$/ ;
        die if defined $contest && (time > contest_end $contest);
        return reply 'A required parameter was not supplied' if grep { !defined } $problem, $format, $prog;
+       return reply 'Maximum source size is 10KB' if length $prog > 25 * 1024;
        return reply 'You must wait 30 seconds between jobs' unless time > lastjob ($r->user) + 30;
        set_lastjob $r->user;
 
This page took 0.029396 seconds and 4 git commands to generate.