Subject: | Unable to untaint false values |
I can't untaint false values. This means that this doesn't work:
#!/usr/bin/perl
use strict;
use warnings;
use CGI::Untaint;
my $untaint = CGI::Untaint->new(foo => "0");
my $bar = $untaint->extract(-as_printable => "foo");
print "'$bar'\n";
(it prints '' not '0')
The problem is in CGI::Untaint::object, where you;re
testing the value rather than testing it's definedness
64c64
< unless ($self->value and $self->value =~ $self->_untaint_re) {
---
Show quoted text
> unless (defined($self->value) and $self->value =~ $self->_untaint_re) {