Hi. Sorry for an anonymous post. I don't want anyone to find out which company I'm talking about.

I've recently been hired by a company to improve their CGI scripts running on NT using IIS. I don't know anything about NT or IIS. My immediate problem is that none of their CGI scripts use taint checking!

I've tried using -T on the shebang line, but I get a "Too late for -T error". This suggests to me that IIS is firing up the Perl interpreter and THEN passing the script to it. The Perl interpreter needs to have taint checking enabled when it comes up, but I'm not sure how this works.

Here's my dilemma: if I figure out how to enable taint checking with Perl AUTOMATICALLY, then all of their scripts will break and we have too many for me to fix all of them. I need to be able to have IIS read the shebang line and fire up Perl if it's on the shebang line (with whatever switches are passed). If it doesn't find a shebang line, and none of their scripts currently have one, then it should fire up Perl with no taint checking -- otherwise all of their current scripts will break. Is their something funky I can do with extensions?

I know that some of you will tell me to get another job and I just might, but I honestly want to find a way to help them out of this problem. In short, I need a transparent solution that will allow them to write secure scripts using taint checking without breaking anything they already have.

Thanks!


In reply to Perl and IIS by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.