Make scalar tainted

2014-12-06 Thread Артём Варнайский
Hello again! Prompt me please elegant and 'vanilla' way to taint some scalar. My vars lost their taint when I just split external string with regexp on param/val pairs, without checking them for correctness. And What do you say about this: $foo.=substr($ENV{PATH},0,0); #$foo tainted if

Re: Make scalar tainted

2014-12-06 Thread Paul Johnson
On Sat, Dec 06, 2014 at 05:48:36PM +0300, Артём Варнайский wrote: Hello again! Prompt me please elegant and 'vanilla' way to taint some scalar. My vars lost their taint when I just split external string with regexp on param/val pairs, without checking them for correctness. And What do you

Re: Make scalar tainted

2014-12-06 Thread Ron Bergin
Артём Варнайский wrote: Hello again! Prompt me please elegant and 'vanilla' way to taint some scalar. My vars lost their taint when I just split external string with regexp on param/val pairs, without checking them for correctness. And What do you say about this:

Re[2]: Make scalar tainted

2014-12-06 Thread Артём Варнайский
Paul Johnson wrote: I'm not sure whether there is a more elegant or more vanilla way to do that. Appending the zero length substr is also the way it is done in the perl core. You would normally take the substr from the original string before splitting it, unless you wanted to taint $foo even if