summaryrefslogtreecommitdiff
path: root/dist/SelfLoader
diff options
context:
space:
mode:
authorLubomir Rintel <lubo.rintel@gooddata.com>2010-10-18 16:40:18 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-21 05:52:20 -0700
commita3a44df66ac2cb0beb603b3dd9697fd81cfcfb30 (patch)
treefeb5d0257c4675be54023597f0a1cfaebc70f557 /dist/SelfLoader
parent157486ae134392a41a6884224e32acc8dc9ed2f5 (diff)
downloadperl-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.pm4
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