Check localtime before check an answer

This commit is contained in:
nemunaire 2014-01-20 10:43:16 +01:00
parent 9feade7286
commit 147bb5be55

View File

@ -30,6 +30,17 @@ for my $p (<$conf>)
}
close $conf;
my $end_time = 1999999999;
if (-f "$root/misc/challenge_started")
{
open my $conf, "<", "$root/misc/challenge_started";
$end_time = <$conf>;
close $conf;
chomp($end_time);
$end_time += 14400;
}
die("TIME expired!") if time() > $end_time;
die("No DB profile found") if ! $profile;
die("submission_dir is not a directory") if ! $submission_dir || ! -d $submission_dir;