Skip to content

Commit ac4436c

Browse files
fix taint tests
1 parent 0968eb1 commit ac4436c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Module/Metadata/ExtractVersion.pm

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,15 @@ sub eval_version
5050
print {$temp} _pl_template( $string, $sigil, $var );
5151
close $temp;
5252

53+
# detaint...
54+
undef $ENV{PATH};
55+
my $perl = $^X;
56+
$perl = $1 if $perl =~ m{^(.+)}s;
57+
5358
my $rc;
5459
my $result;
5560
my $err = gensym;
56-
my $pid = open3(my $in, my $out, $err, $^X, $temp);
61+
my $pid = open3(my $in, my $out, $err, $perl, $temp);
5762
my $killer;
5863
if ($^O eq 'MSWin32') {
5964
$killer = fork;

0 commit comments

Comments
 (0)