Skip to content

Commit

Permalink
Remove .. from the path - taint doesn't like that
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Mar 13, 2024
1 parent 9f97be5 commit 7cd2423
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/testcgibin
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ use autodie qw(:all);
use FindBin qw($Bin);
use lib "$Bin/../lib";

$ENV{'root_dir'} = "$Bin/..";
my $path = $Bin;
$path =~ s/^(.+)\/.+/$1/; # Remove the final directory, probably "/bin"
$ENV{'root_dir'} = $path;

eval {
my $testnumber = $ARGV[0];
Expand Down

0 comments on commit 7cd2423

Please sign in to comment.