develooper Front page | perl.beginners | Postings from September 2003

Re: taint mode for cgi script

Thread Previous | Thread Next
From:
Jenda Krynicky
Date:
September 1, 2003 04:46
Subject:
Re: taint mode for cgi script
Message ID:
3F534663.6753.3C1B0D0A@localhost
From: "Bob Showalter" <bob_showalter@taylorwhite.com>
> Vic wrote:
> > I wanna ask when running Apache 2.046 under Windows XP with mod_cgi,
> > how can I turn on the taint mode for the Perl interpretor? (i guess
> > the shebang line wont work since windows nvr look at them anyway.)
> 
> No. Perl will parse the #! line even on Win32. This is explained in
> "perldoc perlrun". So adding -T will enable taint mode:
> 
>    #!/usr/bin/perl -T

I'm afraid you are wrong.

I mean, sure perl does parse the shebang line and processes the 
options specified there, but in this particular case it's
	"Too late for "-T" option at script.pl line 1"

Try to create a tiny script containing just that shebang line and run 
it with

	perl script.pl

So it would have to be Apache who would parse the line and pass the -
T to perl.exe when starting it.

If this is not the case, you'll have to specify the -T somewhere in 
the Apache settings. Don't ask me where, I never worked with Apache 
myself.

Jenda
===== Jenda@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
	-- Terry Pratchett in Sourcery


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About