in reply to Re: Re: Taint bug with backticks in variable assignments
in thread Taint bug with backticks in variable assignments
It would be inefficient for every operator to test every argument for taintedness. Instead, the slightly more efficient and conservative approach is used that if any tainted value has been accessed within the same expression, the whole expression is considered tainted.
#!/usr/bin/perl -T $ENV{PATH} = '/usr/bin:/usr/local/bin:/bin'; $ENV{ENV} = ''; my $good = 'good'; my $bad = `echo bad`; print($bad); print(`echo $good`); #separate expressions print($bad), print(`echo $good`); #single list expression
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Taint bug with backticks in variable assignments
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 Anonymous Monk on Nov 19, 2003 at 17:56 UTC | |
by shotgunefx (Parson) on Nov 19, 2003 at 19:31 UTC | |
| |
by shotgunefx (Parson) on Nov 19, 2003 at 16:42 UTC |