Skip Menu |

This queue is for tickets about the Taint-Util CPAN distribution.

Report information
The Basics
Id: 41930
Status: rejected
Priority: 0/
Queue: Taint-Util

People
Owner: Nobody in particular
Requestors: jpierce [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.06
Fixed in: (no value)



Subject: Fxn cause script death if used with loop
All of while( taint(my $lie = <STDIN>) ){ while( untaint(my $lie = <STDIN>) ){ while( taint($lie = <STDIN>) ){ while( untaint($lie = <STDIN>) ){ cause a script to die without any message once that line is reached, on at least 5.8.4 and 5.8.8
On Wed Dec 24 12:20:34 2008, JPIERCE wrote: Show quoted text
> All of > while( taint(my $lie = <STDIN>) ){ > while( untaint(my $lie = <STDIN>) ){ > while( taint($lie = <STDIN>) ){ > while( untaint($lie = <STDIN>) ){ > > cause a script to die without any message once that line is reached, > on at least 5.8.4 and 5.8.8
It works for me on 5.8.8: $ echo foo | perl -MTaint::Util -le 'print $]; while( taint(my $lie = <STDIN>) ){ print $lie }' 5.008008 That is it doesn't die. However taint() and untaint() don't return the value they touch (they're like chomp in that regard) so you can't use them in a while() loop like that. It's a low-level interface so you should instead do something like: while (<STDIN>) {