From bea5cecf09ba646ff0ff797c17f2360066b71732 Mon Sep 17 00:00:00 2001 From: Brian Fraser Date: Sat, 28 Sep 2013 10:34:34 -0300 Subject: [PATCH] ext/Devel-Peek/t/Peek.t: Don't leave PATH tainted. The tests originally left $ENV{PATH} tainted. However, now that the file ends up using fresh_perl_is(), $ENV{PATH} may end up being used in some systems, like in Windows. --- ext/Devel-Peek/t/Peek.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t index 18c40d7..4a7af42 100644 --- a/ext/Devel-Peek/t/Peek.t +++ b/ext/Devel-Peek/t/Peek.t @@ -626,6 +626,8 @@ do_test('scalar with pos magic', # ENV hashes is also not always null terminated. # if (${^TAINT}) { + # Save and restore PATH, since fresh_perl ends up using that in Windows. + my $path = $ENV{PATH}; do_test('tainted value in %ENV', $ENV{PATH}=@ARGV, # scalar(@ARGV) is a handy known tainted value 'SV = PVMG\\($ADDR\\) at $ADDR @@ -653,6 +655,7 @@ if (${^TAINT}) { MAGIC = $ADDR MG_VIRTUAL = &PL_vtbl_taint MG_TYPE = PERL_MAGIC_taint\\(t\\)'); + $ENV{PATH} = $path; } do_test('blessed reference', -- 2.7.4