diff options
author | Lubomir Rintel <lubo.rintel@gooddata.com> | 2010-10-18 16:40:18 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-21 05:52:20 -0700 |
commit | a3a44df66ac2cb0beb603b3dd9697fd81cfcfb30 (patch) | |
tree | feb5d0257c4675be54023597f0a1cfaebc70f557 /dist/SelfLoader | |
parent | 157486ae134392a41a6884224e32acc8dc9ed2f5 (diff) | |
download | perl-a3a44df66ac2cb0beb603b3dd9697fd81cfcfb30.tar.gz |
[perl #72062] Untaint DATA after it's reopened
DATA handle is untainted on startup, but as we close and reopen it it
gets the taint flag. It's safe to untaint it though, since we still hold
the file descriptor open and don't reassign it to another file.
This was probably broken by changeset 29606, (c96b2385 in perl git).
Diffstat (limited to 'dist/SelfLoader')
-rw-r--r-- | dist/SelfLoader/lib/SelfLoader.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/dist/SelfLoader/lib/SelfLoader.pm b/dist/SelfLoader/lib/SelfLoader.pm index 047f7768e8..20e02cccdc 100644 --- a/dist/SelfLoader/lib/SelfLoader.pm +++ b/dist/SelfLoader/lib/SelfLoader.pm @@ -1,7 +1,8 @@ package SelfLoader; use 5.008; use strict; -our $VERSION = "1.17"; +use IO::Handle; +our $VERSION = "1.18"; # The following bit of eval-magic is necessary to make this work on # perls < 5.009005. @@ -102,6 +103,7 @@ sub _load_stubs { close $fh or die "close: $!"; # autocloses, but be paranoid open $fh, '<&', $nfh or croak "reopen2: $!"; # dup() the fd "back" close $nfh or die "close after reopen: $!"; # autocloses, but be paranoid + $fh->untaint; } $Cache{"${currpack}::<DATA"} = 1; # indicate package is cached |