Comments for Perl Advent Calendar Entry 1st Dec 2003. Comments posted below may be displayed on perladvent.org.
Re:what about multiple values?
podmaster on 2003-12-01T12:58:40
*sigh* i really wish I hit preview a couple more timesI was talking about the 1st, CGI::Untaint (obviously). I think it does hit the hammer, but not exactly on the head
:)(face maybe, shoulder?) Re:what about multiple values?
2shortplanks on 2003-12-01T23:40:03
Mutliple values do work, though it's not quite how you might expect. Since you're populating your instance of CGI::Untaint using CGI's Vars method, things that have multiple values are seperated by NUL (\0), as documented in the CGI perldoc.What I normally do in this situation is have my _untaint_re check that each of the things seperated by \0 match what I'm checking, and then have my is_valid do a quick
$self->valid([split/\0/, $self->value]); Re:what about multiple values?
2shortplanks on 2003-12-01T23:45:12
even.$self->value([split/\0/, $self->value]); Re:what about multiple values?
podmaster on 2003-12-02T20:33:43
Sure you could do that, but i don't think you should need to. I think CGI::Untaint could be more, you know, convenient:) Re:what about multiple values?
tmtm on 2003-12-08T17:20:14
Patches welcome:)
Re:SEE ALSO: Data::FormValidator
markjugg on 2003-12-01T19:50:08
I should have also mentioned it can do untainting in many cases as well.