in reply to Re^4: Tainting problem on Strawberry perl
in thread Tainting problem on Strawberry perl
Some more (speculation) on the subject:
$wdir =~ s[:][]g; can probably be removed from the test. I didn't want to remove too much, but I don't see how this could possibly trigger the bug. So really, the minimal test is probably
use File::Spec::Win32; my $wdir = 'C/strawberry'; $wdir =~ /(.*)/; print File::Spec::Win32->catfile('C:/cache', $1), "\n";
The "C:" being appended probably comes from $cdir. The last regexp to successfully match in catfile is $path =~ s/^([a-z]:)/\u$1/s; (via canonpath via catdir), where path is a copy of $cdir.
That would explain why $1 has been changed but not how it managed to get appended. I wouldn't mind having a look at your File/Spec/Win32.pm, specifically catfile.
|
|---|