Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 19, 2010, 1:28 am
rate this thread
Although I'm using CGI::Application this also relates to the use of CGI.pm
I would like to know if there is any benefit in validating the $q->param() hash
in place before copying it to a lexical hash. In other words, is it better to:
<do something> if $q->param(foo) !~ /<some regexp>/;
..... rather than:
$form_fields = $q->param($_) for $q->param();
<do something> if $form_fields !~ /<some regexp>/;
Is there a difference in security?
Re: Validate $q->param() instead of copying to hash first?
See the "FETCHING THE PARAMETER LIST AS A HASH" section in
email: perl -le "print scalar reverse qq/moc.liamg0cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
- » FAQ 4.64 How do I reset an each() operation part-way through?
- — Next thread in » PERL Discussions