develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #119855] chdir, taint, and if

Thread Previous | Thread Next
From:
Zefram
Date:
September 17, 2013 10:51
Subject:
Re: [perl #119855] chdir, taint, and if
Message ID:
20130917105042.GP31643@fysh.org
ben@hildred.us wrote:
>When running under taint mode the first works, but the second does not

Not normally regarded as a bug.  Perl's taint checking deliberately
doesn't track data flows in a fine-grained manner, because that would
be much more expensive (even for programs not using tainting).  Once a
statement has read a tainted variable, the whole statement is tainted,
so it can't perform unsafe actions and its outputs are tainted.  You've
written the same logic in a two-statement form and in a one-statement
form, so the difference in tainting behaviour is expected.

-zefram

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About