Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the File-pushd CPAN distribution.

Report information
The Basics
Id: 73072
Status: resolved
Priority: 0/
Queue: File-pushd

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

Bug Information
Severity: Critical
Broken in: 1.001
Fixed in: (no value)



Subject: [PATCH] 2 cygwin failures with 1.001
cygwin fails 1. with the tainted test $ENV{PATH} = $1; # for taint mode which is /usr/local/bin for my perls, but /usr/bin must be included also to be able to load the shared libraries dependent on the shared libperl. I haven't tested win32, but I guess the Win32 loader is not so strict. 2. cygwin prints an error message at lib/File/pushd.pm:42 eval { $tainted_dest = $target_dir ? abs_path( $target_dir ) : $orig }; my $dest; if ( $tainted_dest =~ $options->{untaint_pattern} ) { when $target_dir does not exist, so $tainted_dest is empty. I moved the check upwards. -- Reini Urban
Subject: File-pushd-1.001-cygwin.patch
difforig File-pushd-1.001-JElyDI diff -u File-pushd-1.001-JElyDI/lib/File/pushd.pm.orig --- File-pushd-1.001-JElyDI/lib/File/pushd.pm.orig 2011-12-07 09:45:31.679118900 -0600 +++ File-pushd-1.001-JElyDI/lib/File/pushd.pm 2011-12-07 09:44:13.132243900 -0600 @@ -39,6 +39,7 @@ my $tainted_dest; eval { $tainted_dest = $target_dir ? abs_path( $target_dir ) : $orig }; + croak "Can't locate directory $target_dir: $@" if $@; my $dest; if ( $tainted_dest =~ $options->{untaint_pattern} ) { @@ -48,8 +49,6 @@ $dest = $tainted_dest; } - croak "Can't locate directory $target_dir: $@" if $@; - if ($dest ne $orig) { chdir $dest or croak "Can't chdir to $dest\: $!"; } diff -u File-pushd-1.001-JElyDI/t/File_pushd.t.orig --- File-pushd-1.001-JElyDI/t/File_pushd.t.orig 2011-12-07 09:54:47.585368900 -0600 +++ File-pushd-1.001-JElyDI/t/File_pushd.t 2011-12-07 09:54:47.538493900 -0600 @@ -196,6 +196,7 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; $^X =~ m{(.*)[\\/]perl.*$}; $ENV{PATH} = $1; # for taint mode + $ENV{PATH} = "$1:/usr/bin" if $^O eq 'cygwin'; $temp_dir = `$^X $program_file`; }
Thank you. Patch applied and released to CPAN as 1.002.