diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-02-18 18:22:13 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-02-18 18:22:13 +0000 |
commit | a70a16279b57a1b432b27e8b15d0377583bdb21f (patch) | |
tree | f4f2fc1860f4aef9e26480d6331908a32ff2a97e /t/test.pl | |
parent | d2a59f97adfd492f72c6841a4b888253ca972521 (diff) | |
download | perl-a70a16279b57a1b432b27e8b15d0377583bdb21f.tar.gz |
Assume that if runperl is called under tainting, that the caller really
really wanted to run perl, so brute force untaint everything.
p4raw-id: //depot/perl@27220
Diffstat (limited to 't/test.pl')
-rw-r--r-- | t/test.pl | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -481,6 +481,15 @@ sub runperl { die "test.pl:runperl() does not take a hashref" if ref $_[0] and ref $_[0] eq 'HASH'; my $runperl = &_create_runperl; + if (${^TAINT}) { + # We will assume that if you're running under -T, you really mean + # to run a fresh perl, so we'll brute force launder everything for + # you + foreach ($runperl, $ENV{PATH}) { + $_ =~ /(.*)/s; + $_ = $1; + } + } my $result = `$runperl`; $result =~ s/\n\n/\n/ if $is_vms; # XXX pipes sometimes double these return $result; |