B
bwooster47
I've searched for this issue but did not find any documents or discussions - does anyone know if this is expected, and if so, why?
In a CGI script running with -Tw, a "statement if something" causes script abort with message about insecure dependency while the same thing unrolled in an "if something {statement}" works fine.
Here's the entire runnable cgi script:
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
$ENV{PATH} = '';
my $query = new CGI;
my $input_boolean = $query->param('boolean');
print $query->header();
print "Test started. ";
print `/bin/echo TRUE. ` if ($input_boolean);
# Insecure dependency in `` while running with -T switch at /usr/lib/cgi-bin/cgi-test.pl line 14.
# But this line below is fine:
if ($input_boolean) { print `/bin/echo TRUE. `; }
print "Test done.";
exit (0);
In a CGI script running with -Tw, a "statement if something" causes script abort with message about insecure dependency while the same thing unrolled in an "if something {statement}" works fine.
Here's the entire runnable cgi script:
use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
$ENV{PATH} = '';
my $query = new CGI;
my $input_boolean = $query->param('boolean');
print $query->header();
print "Test started. ";
print `/bin/echo TRUE. ` if ($input_boolean);
# Insecure dependency in `` while running with -T switch at /usr/lib/cgi-bin/cgi-test.pl line 14.
# But this line below is fine:
if ($input_boolean) { print `/bin/echo TRUE. `; }
print "Test done.";
exit (0);