Skip to content

Commit a1597b6

Browse files
fix taint tests
1 parent ea621d8 commit a1597b6

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
@@ -45,10 +45,15 @@ sub eval_version
4545
print {$temp} _pl_template( $string, $sigil, $var );
4646
close $temp;
4747

48+
# detaint...
49+
undef $ENV{PATH};
50+
my $perl = $^X;
51+
$perl = $1 if $perl =~ m{^(.+)}s;
52+
4853
my $rc;
4954
my $result;
5055
my $err = gensym;
51-
my $pid = open3(my $in, my $out, $err, $^X, $temp);
56+
my $pid = open3(my $in, my $out, $err, $perl, $temp);
5257
my $killer;
5358
if ($^O eq 'MSWin32') {
5459
$killer = fork;

0 commit comments

Comments
 (0)