From fac8f8af17e5f8f19cbbc48d6193b22774d78035 Mon Sep 17 00:00:00 2001 From: Joel Berger Date: Sun, 2 Dec 2012 10:26:15 -0600 Subject: [PATCH] Fix another tainted variable so that tests now pass under `prove -lT` --- lib/File/chdir.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/File/chdir.pm b/lib/File/chdir.pm index 3aacfb6..a2a1abd 100644 --- a/lib/File/chdir.pm +++ b/lib/File/chdir.pm @@ -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) ) {