Closed p5pRT closed 21 years ago
---------------- cut here ----------------------- #!/bin/sh exec env PT=zz/yy perl -Tx $0 #!/usr/local/bin/perl -T
no re 'taint'; my $pcold = "/yy"; my $tainted; if ($ENV{'PT'} =~ m\,^(.*)\Q$pcold\E$\,) { $tainted = "$1/pp"; }
print (STDERR is_tainted($tainted) ? "TAINTED\n" : "NOT TAINTED\n");
sub is_tainted { return ! eval { join(''\,@_)\, kill 0; 1; }; } ---------------- cut here -----------------------
The above prints "TAINTED" on 5.005_02 and 5.005_03.
It shouldn't.
Interestingly enough\, substituting "/yy" for "\Q$pcold\E" fixes the problem. Why?
Thanks\, -Dave
This appears to still be true in bleadperl.
#!/bin/sh exec env PT=zz/yy perl -Tx $0 #!/usr/local/bin/perl -T
no re 'taint'; my $pcold = "/yy"; my $tainted; if ($ENV{'PT'} =~ m\,^(.*)\Q$pcold\E$\,) { $tainted = "$1/pp"; }
print (STDERR is_tainted($tainted) ? "TAINTED\n" : "NOT TAINTED\n");
sub is_tainted { return ! eval { join(''\,@_)\, kill 0; 1; }; } ---------------- cut here -----------------------
The above prints "TAINTED" on 5.005_02 and 5.005_03.
It shouldn't.
Interestingly enough\, substituting "/yy" for "\Q$pcold\E" fixes the problem. Why?
Thanks\, -Dave
chromatic says: #1824 does the right thing on 5.6.0 and 5.8.0.
@rspier - Status changed from 'open' to 'resolved'
Migrated from rt.perl.org#1824 (status was 'resolved')
Searchable as RT1824$