Skip to content

Commit

Permalink
Fix another tainted variable so that tests now pass under prove -lT
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Dec 2, 2012
1 parent ecaf12f commit fac8f8a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/File/chdir.pm
Expand Up @@ -39,7 +39,8 @@ sub _catpath {
}

sub _chdir {
my($new_dir) = @_;
# Untaint target directory
my ($new_dir) = $_[0] =~ /(.*)/s;

local $Carp::CarpLevel = $Carp::CarpLevel + 1;
if ( ! CORE::chdir($new_dir) ) {
Expand Down

0 comments on commit fac8f8a

Please sign in to comment.