Your skill will accomplish what the force of many cannot |
|
PerlMonks |
CGI::param wrapper for untaintingby dcardamo (Initiate) |
on Mar 27, 2001 at 22:59 UTC ( [id://67585]=perlquestion: print w/replies, xml ) | Need Help?? |
dcardamo has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to make a function called param which is a wrapper for CGI::param. Its only purpose is to go through what is returned from param($string) and untaint it.
Here is the code I've got:
Now when I run it (I've only tried asking for a scalar) then $retval is always undef after calling CGI::param($string). I know that the $string I'm asking for is in the form. I've also tried calling my sub 'safeparam' and then importing param from CGI into my namespace so that I can call it normally, and that produces the same results. Does anyone have an idea of why this is happening, or if there is already an untainting CGI wrapper out there?
Thanks,
Back to
Seekers of Perl Wisdom
|
|