I turned on taint checks and now my script dies with the message: "Insecure $ENV{PATH} at line XX" every time I try to run it! Even if you don't rely on the path when you invoke an external program, there's a chance that the invoked program might. Therefore you need to include the following line towards the top of your script whenever you use taint checks:
$ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin';
Adjust this as necessary for the list of directories you want searched. It's not a good idea to include the current directory (".") in the path.
0 comments, (577 reads) All Articles by, GentleGiant