Skip Menu |

This queue is for tickets about the Devel-FindPerl CPAN distribution.

Report information
The Basics
Id: 90512
Status: resolved
Priority: 0/
Queue: Devel-FindPerl

People
Owner: Nobody in particular
Requestors: TINITA [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.008
  • 0.009
  • 0.010
Fixed in: (no value)



Subject: if $ENV (respectively $ENV{ENV}) is set, t/11-tainted.t fails
On some systems/shells $ENV has content, for example "/etc/bash.bashrc" In the module, you clean $ENV{PATH}, but not $ENV{ENV}. so the test fails: ENV=bla prove -Ilib t/11-tainted.t ... Insecure $ENV{ENV} while running with -T switch ... Only unset ENV helps. perlsec says: Show quoted text
> Because some shells may use the variables IFS, CDPATH, ENV, and BASH_ENV, Perl checks > that those are > either empty or untainted when starting subprocesses. You may wish to add something > like this to your setid and taint-checking scripts. > > delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
thanks, tina
On Tue Nov 19 07:03:05 2013, TINITA wrote: Show quoted text
> On some systems/shells $ENV has content, for example > "/etc/bash.bashrc" > > In the module, you clean $ENV{PATH}, but not $ENV{ENV}. so the test > fails: > > ENV=bla prove -Ilib t/11-tainted.t > ... > Insecure $ENV{ENV} while running with -T switch > ... > > Only > > unset ENV > > helps. > > perlsec says:
> > Because some shells may use the variables IFS, CDPATH, ENV, and > > BASH_ENV, Perl checks > that those are > > either empty or untainted when starting subprocesses. You may wish to > > add something > like this to your setid and taint-checking scripts. > > > > delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
> > thanks, > tina
Hi Tina. Thanks for your bugreport. I just misread $ENV{ENV} as $ENV{PATH} and was like "WTF is going on there?", it seems reading is difficult :-/ Just released Devel::FindPerl 0.011, which should fix this. Leon