<code> #!/usr/bin/perl -T use strict; use warnings; # Original code $ENV{PATH} = '/usr/bin:/usr/local/bin:/bin'; $ENV{ENV} = ''; my $temp_fails = [ `mktemp /tmp/temp.$$.XXXXXX`, `mktemp /tmp/temp2.$$.XXXXXX`, ]; #!/usr/bin/perl -T use strict; use warnings; # This fails as well.. $ENV{PATH} = '/usr/bin:/usr/local/bin:/bin'; $ENV{ENV} = ''; my $untainted = 'foo'; my $also_untainted = 'foobar'; my $temp_fails = [ `mktemp /tmp/temp.$untainted.XXXXXX`, `mktemp /tmp/temp.$also_untainted.XXXXXX`, ]; #This is perl, v5.6.1 built for sparc64-linux # The following works ok sub do_nothing { @_ }; $ENV{PATH} = '/usr/bin:/usr/local/bin:/bin'; $ENV{ENV} = ''; my $temp_fails = [ do_nothing(`mktemp /tmp/temp.$untainted.XXXXXX`), do_nothing(`mktemp /tmp/temp.$also_untainted.XXXXXX +`), ];
In reply to Taint bug with backticks in variable assignments by shotgunefx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |