Anything submitted from a form to the script has this sub called on it when the variable is set. Everything is passed to a database using DBI's $dbh->execute($param1,$param2,...). He never calls system. He never calls eval. He never has a regex with the e modifier. My question is this: is this paranoia or what? When I ask him why he does this blindly, he always tells me that it's for security...so nobody can crack the box through his scripts.sub makeSafe{ my $value = $_[0]; if($value =~ m/[;><\*`\|]/){ $value =~ s/[;><\*`\|]//g; } return $value; }
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |