- or download this
$ cat taint_test.pm
package taint_test;
...
use warnings;
chdir +(split /:/, $ENV{PATH})[0];
- or download this
$ cat check_taint_1.pl
use strict;
...
$ENV{PATH} = '/bin:/usr/bin';
use lib '.';
use taint_test;
- or download this
$ perl -T check_taint_1.pl
Insecure dependency in chdir while running with -T switch at taint_tes
+t.pm line 6.
Compilation failed in require at check_taint_1.pl line 6.
BEGIN failed--compilation aborted at check_taint_1.pl line 6.
$
- or download this
$ cat check_taint_2.pl
use strict;
...
BEGIN { $ENV{PATH} = '/bin:/usr/bin'; }
use lib '.';
use taint_test;
- or download this
$ perl -T check_taint_2.pl
$
- or download this
$ cat check_taint_3.pl
use strict;
...
use lib '.';
use taint_test;
BEGIN { $ENV{PATH} = '/bin:/usr/bin'; }
- or download this
$ perl -T check_taint_3.pl
Insecure dependency in chdir while running with -T switch at taint_tes
+t.pm line 6.
Compilation failed in require at check_taint_3.pl line 5.
BEGIN failed--compilation aborted at check_taint_3.pl line 5.
$