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

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

Thread Previous | Thread Next
September 17, 2013 10:51
Re: [perl #119855] chdir, taint, and if
Message ID: 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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About