From 7cd242382bc90496ec274cedc7225a68f6fda5ab Mon Sep 17 00:00:00 2001 From: Nigel Horne Date: Wed, 13 Mar 2024 16:52:10 -0400 Subject: [PATCH] Remove .. from the path - taint doesn't like that --- bin/testcgibin | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/testcgibin b/bin/testcgibin index 3e21ee1a..73b260cc 100755 --- a/bin/testcgibin +++ b/bin/testcgibin @@ -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];