projects
/
gruntmaster-page.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a9aaf1
)
Restrict submit size to 25KB
author
Marius Gavrilescu
<marius@ieval.ro>
Thu, 27 Feb 2014 14:50:20 +0000
(16:50 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Thu, 27 Feb 2014 15:06:01 +0000
(17:06 +0200)
lib/Gruntmaster/Page/Submit.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Gruntmaster/Page/Submit.pm
b/lib/Gruntmaster/Page/Submit.pm
index 569fe9186f38c2cadff58d62af93767f43a4ce61..ea67c2b609b3b6c575c86f92e2a7f1014bec367c 100644
(file)
--- a/
lib/Gruntmaster/Page/Submit.pm
+++ b/
lib/Gruntmaster/Page/Submit.pm
@@
-24,6
+24,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.010873 seconds
and
4
git commands to generate.