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

(tye)Re: Untainted done right!

by tye (Sage)
on Feb 12, 2001 at 23:29 UTC ( #57959=note: print w/replies, xml ) Need Help??


in reply to Untainted done right!

You usually untaint by matching "nice" stuff and using $1:

if( $temp =~ m#([-\w./]*)# ) { # or if( $temp =~ m#^(/?(?:[-\w.]+/)*[-\w.]*)$# ) { $temp= $1; } else { die "Invalid input..."; }

The die may not be the proper way to fail, depending on your environment.

        - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2022-12-01 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?