in reply to Re: Taint Mode on an Old Web Server
in thread Taint Mode on an Old Web Server

Perl does check the shebang line in Windows for commandline switches like -w and -T.

Check your logs, if you are getting a "Too late for option -T" error, Perl is being invoked with the -T already, ie your scripts are associated to perl -T instead of just perl.


TGI says moo

  • Comment on Re: Re: Taint Mode on an Old Web Server

Replies are listed 'Best First'.
Re: Re: Re: Taint Mode on an Old Web Server
by chip (Curate) on Dec 19, 2001 at 12:28 UTC
    Don't you mean that the -T option is not on the file association -- but it should be?

        -- Chip Salzenberg, Free-Floating Agent of Chaos

      My mistake, to be more clear:

      1) The -T option is not on the file association.
      2) The shebang line has -T
      3) This causes a server 500 error with the error "Too late for -T option"

      So, is this rectified by adding "-T" to the file association and removing from the shebang line?

      Thanks again!
        So, is this rectified by adding "-T" to the file association and removing from the shebang line?

        I think you should add -T to the association and also leave it in the shebang line ... the latter as a protection in case the file association fails someday.

            -- Chip Salzenberg, Free-Floating Agent of Chaos

Re: Re: Re: Taint Mode on an Old Web Server
by meraxes (Friar) on Dec 19, 2001 at 02:47 UTC
    Okay, I am indeed getting the "Too late for option -T" error.

    Now, the file extension is set as .cgi and the file association on the NT box is set for .cgi but there is no -T option among the default execution parameters.

    So now that seems to be the problem, anyone else know why it's giving me that error despite the fact that it is not being executed with -T?
      Perl, on windows, does not care what the path to perl is in your #! line, but it will process the switches (-w -T -l -whatever).

      So, it is giving you the error (not problem, but error) because it is being executed with -T.

      Now some good server, like apache, do care about the path to perl on the #! line, but that is neither here nor there.

       
      ___crazyinsomniac_______________________________________
      Disclaimer: Don't blame. It came from inside the void

      perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"