Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Answer: How do I get scripts to run with Taint mode on IIS?

by saskaqueer (Friar)
on Jan 14, 2005 at 19:25 UTC ( #422355=categorized answer: print w/replies, xml ) Need Help??

Q&A > CGI programming > How do I get scripts to run with Taint mode on IIS? - Answer contributed by saskaqueer

There is a small hit on speed, as the interpreter loads twice, but the hit is better than running without tainting.

I have to disagree in respect to the performance hit being better than running sans taint mode. If you as a programmer really know what you are doing in a public environment such as CGI, then taint mode is not that necessary. As long as you take all the proper precautions as you would while under taint mode, then you will be fine.

Now, someone will most likely counter this claim with the "well, what if you forget to check for something?" question. Quite true, but like I said, such a thing wouldn't likely occur to someone who knows what they are doing.

  • Comment on Answer: How do I get scripts to run with Taint mode on IIS?
Replies are listed 'Best First'.
Re: Answer: How do I get scripts to run with Taint mode on IIS?
by legato (Monk) on Jan 18, 2005 at 15:09 UTC

    It's very easy to say "well, you can do taint checking without taint mode on". And yes, you are right. But your comment "such a thing wouldn't likely occur to someone who knows what they are doing." is counter-intuitive.

    A good programmer thinks not only of what (s)he is capable of, but also that the code will be maintained in the future -- maybe by someone else. Not using tainting invites three forms of disaster:

    1. Mistakes in untainting (this is analogous to why good programmers use strictures)
    2. Tainting introduced accidentally during a "quick revision"
    3. Tainting introduced by another developer during maintainance.
    If all one is doing involves validating a name and email address or some such simplicity, then perhaps tainting isn't absolutely necessary, but when one is dealing with large amounts of data, it is.

    For this solution, the performance hit is quite tiny. In large environments where performance would be a significant issue, one would likely be able to make the case with the admin staff to set up a perl -T association.

    Anima Legato
    .oO all things connect through the motion of the mind

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2020-09-20 04:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (118 votes). Check out past polls.

    Notices?