You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for ($i=0; $i < @foo; $i++) {
test_tainted($foo[$i], "\$foo[$i]");
}
$foo = {A => $clean, B => $tainted, C => $clean};
for (keys %$foo) {
test_tainted($foo->{$_}, "\$foo->{$_}");
}
produces this output on 5.6.0:
$foo[0] is not tainted
$foo[1] is tainted
$foo[2] is not tainted
$foo->{A} is not tainted
$foo->{B} is tainted
$foo->{C} is tainted
notice that the two identical lists behave differently when used as
contents of an array or as contents of a hash. On 5.005_03 it did
something differently wrong :-)
$foo[0] is tainted
$foo[1] is tainted
$foo[2] is tainted
$foo->{A} is tainted
$foo->{B} is tainted
$foo->{C} is tainted
Both seem odd :-) This came up when creating a hash as an object.
The tainting goes from the tainted value to the end of the contents,
and this wrongly tainted some innocent values. Tracking it down was
a major pain in the ass. I don't think tainting should spread like
this.
Migrated from rt.perl.org#3483 (status was 'resolved')
Searchable as RT3483$
The text was updated successfully, but these errors were encountered: