in reply to File::Temp::tempfile() fails under taint mode

ActiveState perl 5.20.2 on Windows 7.1 passes your test. This sounds like a bug report.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

  • Comment on Re: File::Temp::tempfile() fails under taint mode

Replies are listed 'Best First'.
Re^2: File::Temp::tempfile() fails under taint mode
by Athanasius (Archbishop) on Apr 09, 2015 at 02:41 UTC
      If can be handy it fails on many Strawberry flavours, with different File::Temp version.
      -T -MFile::Temp=tempfile -wE "use Config; print qq(Perl $^V on $^O arc +h $Config{archname} File::Temp v. $File::Temp::VERSION\n);my $fh = te +mpfile();" ----------------------------------------······· | Error in tempfile() using \XXXXXXXXXX: Could not create temp file | \A3pfFkxOIt: Permission denied at -e line 1 | Perl v5.14.2 on MSWin32 arch MSWin32-x86-multi-thread File::Temp v +. 0.22 -------------------------------------------------------------------- +---······· ----------------------------------------······· | Error in tempfile() using template \XXXXXXXXXX: Could not create te +mp file | \tIFifxB347: Permission denied at -e line 1. | Perl v5.20.0 on MSWin32 arch MSWin32-x86-multi-thread-64int File:: +Temp v. | 0.2304 -------------------------------------------------------------------- +---······· ----------------------------------------······· | Error in tempfile() using \XXXXXXXXXX: Could not create temp file | \dr3rzHf4Yp: Permission denied at -e line 1. | Perl v5.16.2 on MSWin32 arch MSWin32-x64-multi-thread File::Temp v +. 0.22 -------------------------------------------------------------------- +---·······

      ..while it runs OK on an ancient 5.8 ActiveState
      L*
      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

      As there is no problem with my running the test (including your command line code), but on your system you have isolated it to File::Temp with taint, I would say it is a bug for File::Temp. It is worth (as Discipulus points out) testing this across other Strawberry installs, particularly 5.18.


      #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.