I'm writing a CGI script that allows a user to create
directories and upload an html file. I'm using this
at the beginning of the script
#!C:\Perl\bin\perl.exe -w -T
#!/usr/bin/perl
use strict;
BEGIN{open(STDERR, ">./err.txt");}
the htmldir is read from a txt file and
untainted like this:
$htmldir =~ s@[^\w\-\\]@@g;
#and using find.pm in this manner:
sub allsubdir{
my$k=0;
my$root = "$ENV{'DOCUMENT_ROOT'}/$htmldir/";
find (\&do_this, $root);
sub do_this {
$_ = $File::Find::dir;
unless(/\.\w*$/){push(@subdir1,$_);}
}
return @subdir;
}
This is the only error I get.
Insecure dependency in chdir while running with -T
switch at C:/Perl/lib/File/Find.pm line 765, <DIRINFO>
line 2.
How do I fix this? I've downloaded the Safe module
but I'm not sure how to use it yet.
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]