line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CGI::Untaint::boolean; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
547
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use vars '$VERSION'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
$VERSION = '1.01'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use base 'CGI::Untaint::object'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
886
|
|
9
|
|
|
|
|
|
|
|
10
|
7
|
|
|
7
|
|
5047
|
sub _untaint_re { qr/^(on|)$/ } |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub is_valid |
13
|
|
|
|
|
|
|
{ |
14
|
1
|
|
|
1
|
1
|
20
|
my $self = shift; |
15
|
1
|
|
|
|
|
3
|
my $value = $self->value(); |
16
|
1
|
|
|
|
|
7
|
my ($untainted) = $value =~ $self->_untaint_re(); |
17
|
1
|
|
50
|
|
|
6
|
$untainted ||= ''; |
18
|
|
|
|
|
|
|
|
19
|
1
|
50
|
|
|
|
10
|
$self->value( $untainted eq 'on' ? 1 : 0 ); |
20
|
|
|
|
|
|
|
|
21
|
1
|
50
|
33
|
|
|
11
|
return unless $untainted eq 'on' || $untainted eq ''; |
22
|
1
|
|
|
|
|
3
|
return 1; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
__END__ |