Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: initialize ENV variables under strict

by true (Pilgrim)
on Oct 23, 2002 at 10:02 UTC ( [id://207342]=note: print w/replies, xml ) Need Help??


in reply to initialize ENV variables under strict

krusty said:
"Environment variables taken from your system, not set by you, are tainted. You may need to untaint it first."

This is how i should have phrased my question.
I want to untaint the tainted %ENV.
This untainting would seem like a very common desire among monks.
Anybody know a simple way to do this in perl5.005?
I can always just check each ENV key as suggested earlier.

thanks folks.

  • Comment on Re: initialize ENV variables under strict

Replies are listed 'Best First'.
Re: Re: initialize ENV variables under strict
by chromatic (Archbishop) on Oct 23, 2002 at 18:14 UTC

    There is no simple way to untaint variables. I can't give you an answer that would fit for every program you'll ever want to write under taint mode because I don't know the details of every program. You have to ask, "Exactly what kind of input do I expect here?" and then you can craft a regular expression to match only that type of input.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-23 23:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found