in reply to Taint bug with backticks in variable assignments
It has nothing to do with the variables. It's that you're forking twice in the same statement (at least that's my guess). Try these:
#!/usr/bin/perl -T use strict; use warnings; $ENV{PATH} = '/usr/bin:/usr/local/bin:/bin'; $ENV{ENV} = ''; my ($a,$b) = (`mktemp /tmp/temp.XXXXXX`, `mktemp /tmp/temp.XXXXXX`); my $temp_fails = [ $a, $b ]; __END__ Insecure dependency in `` while running with -T switch at ./foo line 9 +.
#!/usr/bin/perl -T use strict; use warnings; $ENV{PATH} = '/usr/bin:/usr/local/bin:/bin'; $ENV{ENV} = ''; my $a = `mktemp /tmp/temp.XXXXXX`; my $b = `mktemp /tmp/temp.XXXXXX`; my $temp_fails = [ $a, $b ]; __END__
The latter works just fine
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Taint bug with backticks in variable assignments
by Abigail-II (Bishop) on Nov 19, 2003 at 15:48 UTC | |
|
Re: Re: Taint bug with backticks in variable assignments
by shotgunefx (Parson) on Nov 19, 2003 at 15:36 UTC | |
by Anonymous Monk on Nov 19, 2003 at 16:08 UTC | |
by shotgunefx (Parson) on Nov 19, 2003 at 16:14 UTC | |
by Anonymous Monk on Nov 19, 2003 at 16:26 UTC | |
by shotgunefx (Parson) on Nov 19, 2003 at 16:47 UTC | |
| |
by shotgunefx (Parson) on Nov 19, 2003 at 16:42 UTC |