to ...unless ($file_in =~ /^[\w][\w\._-]*$/) { print "Insecure file_in\n"; exit; }
And I also fixed the regexp that checked for double dots, from /^\.{2,}$/ to... /\.\./if ($file_out =~ /^([\w][\w\._-]*)$/) { $file_out = $1; } else { print "Insecure file_out\n"; exit; }
In reply to Re: Re: Taint problem opening file to write
by fireartist
in thread Taint problem opening file to write
by fireartist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |