sub untaint { my $s = $_[0]; if ($s =~ /^([\w \-\@\(\)\,\.\/]+)$/) { $s = $1; # $data now untainted } else { die "Bad data in $s"; # log this somewhere } return $s; }
When I get home, I'll look into writing a separate untaint subroutine for each field, but is this more correct than the original?
Thanks again.
In reply to Re: Re: First Time Untainting Data
by svsingh
in thread First Time Untainting Data
by svsingh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |