We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent acfead7 commit 74b48c4Copy full SHA for 74b48c4
cgi-bin/result.cgi
@@ -34,7 +34,10 @@ EOD
34
35
my $base_cgi = "/cgi-bin/index.cgi";
36
my $JOBID = $q->param('JOBID');
37
+$JOBID =~ s/\s+//g;
38
39
+security_check($JOBID);
40
+
41
if (defined $q->param('side')){
42
if ($q->param('side') eq 'left' ) {result_left($JOBID);}
43
else {result_right($JOBID);}
@@ -46,6 +49,17 @@ if (-f "$SL_session_dir/$JOBID/$JOBID.ok") { completed_job($JOBID);}
46
49
if (-d "$SL_session_dir/$JOBID") { running_job($JOBID); }
47
50
unknown_job($JOBID);
48
51
52
+sub security_check{
53
+ my $JOBID = shift;
54
+ if ($JOBID =~ /\D/) {
55
+ print $q->header("text/html");
56
+ print "Invalid job id";
57
+ print $q->end_html;
58
59
+ exit();
60
+ }
61
+}
62
63
sub failed_job{
64
my $JOBID = shift;
65
print $q->header("text/html");
0 commit comments