taint mode and require using "."

A

Asterbing

Considering a script with a line like this :

require 'config.cgi';

When I activate the taint mode through "#!/usr/bin/perl -T" and adding
"use CGI::Carp qw/fatalsToBrowser/;" for the purpose to see tatal errors
on browser, I'm getting this error "Can't locate config.cgi in @INC".

According to what I've read, it seems normal since taint mode remove the
"." from @INC.

I don't wish to indicate an absolute path which would be to adjust for
every install on a new server, thus I've just modified the require line
like this : "require './config.cgi';

But... When I run the script now I'm just getting a direct perl.exe
crash without any message !

How to write this require line with taint mode ?
 
G

Gunnar Hjalmarsson

Asterbing said:
Considering a script with a line like this :

require 'config.cgi';

When I activate the taint mode through "#!/usr/bin/perl -T" and adding
"use CGI::Carp qw/fatalsToBrowser/;" for the purpose to see tatal errors
on browser, I'm getting this error "Can't locate config.cgi in @INC".

According to what I've read, it seems normal since taint mode remove the
"." from @INC.

You can add it:

use lib '.';
 
G

Gunnar Hjalmarsson

Emmanuel said:
Le Wed, 05 Apr 2006 14:51:42 +0200, Gunnar Hjalmarsson a écrit :

Nope, not in taint mode.

C:\home>type test.pl
use lib '.';
grep $_ eq '.', @INC and print "Worked fine\n";

C:\home>perl -T test.pl
Worked fine

C:\home>
 
R

robic0

Considering a script with a line like this :

require 'config.cgi';

When I activate the taint mode through "#!/usr/bin/perl -T" and adding
"use CGI::Carp qw/fatalsToBrowser/;" for the purpose to see tatal errors
on browser, I'm getting this error "Can't locate config.cgi in @INC".

According to what I've read, it seems normal since taint mode remove the
"." from @INC.

I don't wish to indicate an absolute path which would be to adjust for
every install on a new server, thus I've just modified the require line
like this : "require './config.cgi';

But... When I run the script now I'm just getting a direct perl.exe
crash without any message !

How to write this require line with taint mode ?
Whats a taint mode? I hope this is not a word from Perl.
If it is, then Perl really does suck rancid wet dogshit.
 
J

Joe Smith

robic0 said:
Whats a taint mode? I hope this is not a word from Perl.
If it is, then Perl really does suck rancid wet dogshit.

And you've never watched a courtroom drama where the
judge disallows the use of "tainted evidence", right?

Taint: place under suspicion or cast doubt upon, as
in unreliable testimony.

Anyone who does not accept 'taint' as a valid word
really does suck rancid wet robicshit.
 
R

robic0

And you've never watched a courtroom drama where the
judge disallows the use of "tainted evidence", right?

Taint: place under suspicion or cast doubt upon, as
in unreliable testimony.

Anyone who does not accept 'taint' as a valid word
really does suck rancid wet robicshit.
^^^^^
blow me scumbag.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,534
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top