mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 14:48:41 +00:00
chore(web/problem/submit): set default size limit to 100KB
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
35eb4c170c
commit
10ccb26815
@ -735,7 +735,7 @@ function newSubmissionForm($form_name, $requirement, $zip_file_name_gen, $handle
|
|||||||
$stat = $zip_file->statName($req['file_name']);
|
$stat = $zip_file->statName($req['file_name']);
|
||||||
|
|
||||||
if ($req['type'] == 'source code') {
|
if ($req['type'] == 'source code') {
|
||||||
$max_size = isset($req['size']) ? (int)$req['size'] : 50;
|
$max_size = isset($req['size']) ? (int)$req['size'] : 100;
|
||||||
if ($stat['size'] > $max_size * 1024) {
|
if ($stat['size'] > $max_size * 1024) {
|
||||||
$zip_file->close();
|
$zip_file->close();
|
||||||
unlink(UOJContext::storagePath() . $zip_file_name);
|
unlink(UOJContext::storagePath() . $zip_file_name);
|
||||||
|
Loading…
Reference in New Issue
Block a user