SilasTheMonk has asked for the wisdom of the Perl Monks concerning the following question:
I am testing this on windows although the code is destined to be a CGI script. The libary could be used in several ways, not just CGI scripts hence the importance of portability. Now when I run my CGI script on windows in taint mode I get the following error:sub create { my $class = shift; require File::Spec; my @path = split(/\:\:/,$class); my $file = pop @path; $file .= ".pm"; my $fp = File::Spec->catfile(@path, $file); require $fp; return $class->new(@_); }
Now I am using CGI::Safe so I thought the path should be untainted. I have looked inside the File::Spec module but I cannot actually see where it is going outside the system to look at the filesystem.Insecure dependency in require while running with -T switch at .... [the line "require $fp"]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Spec and taint
by Anonymous Monk on Aug 26, 2008 at 21:03 UTC | |
by SilasTheMonk (Chaplain) on Aug 26, 2008 at 21:44 UTC | |
|
Re: File::Spec and taint
by Anonymous Monk on Aug 26, 2008 at 20:58 UTC |