CGI Paramater Validation Simple Validation 5 of 32 : [PREV] [NEXT]

Quick & Dirty

If your names not on the list, you're not coming in!

my %list = ( action => 1 };

foreach my $name ($cgi->param()) {
next unless($list{$name});
  my $value = $cgi->param($name);
  eval "\$$name = $value";
}

Better, but still need to untaint. How about we have some rule.


© 2003 Barbie barbie@missbarbell.co.uk Home http://birmingham.pm.org/