Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Untainting known good data

by wog (Curate)
on Sep 07, 2001 at 02:09 UTC ( [id://110767]=note: print w/replies, xml ) Need Help??


in reply to Untainting known good data

If you know you trust your input file you should be able to make all data comeing from the file be trusted. You can do this with IO::Handle's untaint method:

use IO::Handle; # ... F->untaint == 0 or die "Untainting filehandle failed: $!\n"; # ...

As the IO::Handle's docs say, this is a very trusting action to take and should only be done if you can really trust what you are untainting.

You could, of course, take another route of actually untainting the $tmpl variable:

($tmpl) = $tmpl =~ /(.*)/s;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://110767]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-16 14:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found