Commit a326cd55 authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 1089448: Strawberry Perl throws a "Insecure dependency in sysopen" error when attaching a file

r=gerv a=dkl
parent f7216aa9
......@@ -87,6 +87,14 @@ sub init_page {
# Some modules throw undefined errors (notably File::Spec::Win32) if
# PATH is undefined.
$ENV{'PATH'} = '';
# On Windows, these paths are tainted, preventing File::Spec::Win32->tmpdir
# from using them. But we need a place to temporary store attachments
# which are uploaded.
if (ON_WINDOWS) {
foreach my $temp (qw(TMPDIR TMP TEMP)) {
trick_taint($ENV{$temp}) if $ENV{$temp};
}
}
}
# Because this function is run live from perl "use" commands of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment