blib/lib/Catalyst/Plugin/CSRFToken.pm

filter: Statementstmt 90.0% 127 / 141 Branchbran 58.4% 62 / 106 Conditioncond 59.6% 31 / 52 MC/DCmcdc 38.4% 10 / 26 Subroutinesub 95.4% 21 / 22 Podpod 66.6% 4 / 6 totaltotal 72.2% 255 / 353 CC 72 SCAR 25.9
CC
72
Cov
74%
check_csrf_token
35.1
find_csrf_token_in_request
10.5
csrf_token
9.5
CRAP 13.4
↑ Summary
1 package Catalyst::Plugin::CSRFToken;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Digest::SHA qw(hmac_sha256_hex);
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use MIME::Base64 qw(encode_base64url decode_base64url);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 ▶use Crypt::URandom qw(urandom);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 2 our $VERSION = '1.100';
11  
12 2 requires 'session', 'stash', 'req', 'detach';
13  
14 2 has 'csrf_token_session_key' => (is => 'ro', required => 1, builder => '_build_csrf_token_session_key');
15  
16 14 ▶sub _build_csrf_token_session_key {
Subroutine _build_csrf_token_session_key: called CC=3 SCAR=13.1
17 14 ▶ if(my $config = shift->config->{'Plugin::CSRFToken'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $config = +(shift())->config->{"Plugin::CSRFToken"}) 14 0 14
18 14 ▶ return $config->{session_key} if exists $config->{session_key};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"session_key"} 14 0 14
19 }
20 0 return '_csrf_token';
21 }
22  
23 2 has 'csrf_token_param_key' => (is => 'ro', required => 1, builder => '_build_csrf_token_param_key');
24  
25 14 ▶sub _build_csrf_token_param_key {
Subroutine _build_csrf_token_param_key: called CC=4 SCAR=16.1
26 14 ▶ if(my $config = shift->config->{'Plugin::CSRFToken'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $config = +(shift())->config->{"Plugin::CSRFToken"}) 14 0 14
27 14 ▶ return $config->{param_key} if exists $config->{param_key};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"param_key"} 0 14 14
28 14 ▶ return $config->{token_param_key} if exists $config->{token_param_key};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"token_param_key"} 14 0 14
29 }
30 0 return 'csrf_token';
31 }
32  
33 2 has 'csrf_max_age' => (is => 'ro', required => 1, builder => '_build_csrf_max_age');
34  
35 14 ▶sub _build_csrf_max_age {
Subroutine _build_csrf_max_age: called CC=3 SCAR=13.1
36 14 ▶ if(my $config = shift->config->{'Plugin::CSRFToken'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $config = +(shift())->config->{"Plugin::CSRFToken"}) 14 0 14
37 14 ▶ return $config->{max_age} if exists $config->{max_age}; # Backwards compatibility
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"max_age"} 14 0 14
38 }
39 0 return 3600;
40 }
41  
42 2 has 'csrf_default_secret' => (
43 is => 'ro',
44 predicate => 'has_csrf_default_secret',
45 builder => '_build_csrf_default_secret',
46 );
47  
48 14 ▶sub _build_csrf_default_secret {
Subroutine _build_csrf_default_secret: called CC=3 SCAR=13.1
49 14 ▶ if(my $config = shift->config->{'Plugin::CSRFToken'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $config = +(shift())->config->{"Plugin::CSRFToken"}) 14 0 14
50 14 ▶ return $config->{default_secret} if exists $config->{default_secret};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"default_secret"} 14 0 14
51 }
52 0 return undef;
53 }
54  
55 2 has 'auto_check_csrf_token' => ( is => 'ro', required => 1, builder => '_build_auto_check_csrf_token' );
56  
57 14 ▶sub _build_auto_check_csrf_token {
Subroutine _build_auto_check_csrf_token: called CC=4 SCAR=20.1
58 14 ▶ if(my $config = shift->config->{'Plugin::CSRFToken'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $config = +(shift())->config->{"Plugin::CSRFToken"}) 14 0 14
59 14 ▶ return $config->{auto_check} if exists $config->{auto_check};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"auto_check"} 14 0 14
60 0 ▶ return $config->{auto_check_csrf_token} if exists $config->{auto_check_csrf_token};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"auto_check_csrf_token"} 0 0 0
61 }
62 0 return 0;
63 }
64  
65 2 has 'single_use_csrf_token' => (is => 'ro', required => 1, builder => '_build_single_use_csrf_token');
66  
67 14 ▶sub _build_single_use_csrf_token {
Subroutine _build_single_use_csrf_token: called CC=4 SCAR=14.9
68 14 ▶ if(my $config = shift->config->{'Plugin::CSRFToken'}) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $config = +(shift())->config->{"Plugin::CSRFToken"}) 14 0 14
69 14 ▶ return $config->{single_use_csrf_token} if exists $config->{single_use_csrf_token};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"single_use_csrf_token"} 0 14 14
70 14 ▶ return $config->{single_use} if exists $config->{single_use};
Branch: 1 branch
BranchTrueFalseTotal
if exists $config->{"single_use"} 0 14 14
71 }
72 14 return 0;
73 }
74  
75 14 ▶before 'dispatch' => sub {
Subroutine __ANON__: called CC=4 SCAR=14.9
76 14 my $c = shift;
77 $c->check_csrf_token
78 if (
79 ($c->auto_check_csrf_token || $c->action->attributes->{EnableCSRF})
80 14 ▶ && $c->req->method =~ /^(POST|PUT|DELETE|PATCH)$/i
Branch: 1 branch
BranchTrueFalseTotal
if $c->auto_check_csrf_token || $c->action->attributes->{"EnableCSRF"} and $c->req->method =~ /^(POST|PUT|DELETE|PATCH)$/i 9 5 14
Condition50%3/6
$c->auto_check_csrf_token || $c->action->attributes->{"EnableCSRF"} and $c->req->method =~ /^(POST|PUT|DELETE|PATCH)$/i
!ll&&!rl&&r
059
$c->auto_check_csrf_token or $c->action->attributes->{"EnableCSRF"}
l!l&&r!l&&!r
1400
MC/DC33%1/3
$c->auto_check_csrf_token || $c->action->attributes->{"EnableCSRF"} and $c->req->method =~ /^(POST|PUT|DELETE|PATCH)$/i
$c->auto_check_csrf_token $c->action->attributes->{"EnableCSRF"} $c->req->method =~ /^(POST|PUT|DELETE|PATCH)$/i
Truth table40%2/5
A or B and C
A= $c->auto_check_csrf_tokenB= $c->action->attributes->{"EnableCSRF"}C= $c->req->method =~ /^(POST|PUT|DELETE|PATCH)$/i
ABCresult
00X0
1X00
0100
1X11
0111
81 );
82 2 };
83  
84 9 ▶sub check_csrf_token {
Subroutine check_csrf_token: called CC=24 SCAR=35.6
Pod documented
85 9 my $c = shift;
86  
87 9 ▶ $c->log->debug('Checking CSRF token') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 9 9
88  
89 9 ▶ if ($c->action->attributes->{DisableCSRF}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c->action->attributes->{"DisableCSRF"}) 1 8 9
90 1 ▶ $c->log->debug('Skipping CSRF check for action '.$c->action->reverse) if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 1 1
91 1 return 1;
92 }
93  
94 8 ▶ my $token = $c->find_csrf_token_in_request
Branch: 1 branch
BranchTrueFalseTotal
my $token = $c->find_csrf_token_in_request or return $c->delegate_failed_csrf_token_check 8 0 8
95 or return $c->delegate_failed_csrf_token_check;
96  
97 8 ▶ $c->log->debug('Found CSRF token in request') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 8 8
98  
99 8 ▶ return $c->delegate_failed_csrf_token_check if ref $token;
Branch: 1 branch
BranchTrueFalseTotal
if ref $token 1 7 8
100  
101 7 my ($form_id, $version, $payload) = split /:/, $token, 3;
102 7 ▶ unless (
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $form_id and length $form_id and defined $version and $version eq "v2" and defined $payload) 1 6 7
Condition50%6/12
defined $form_id and length $form_id and defined $version and $version eq "v2" and defined $payload
!ll&&!rl&&r
106
defined $form_id and length $form_id and defined $version and $version eq "v2"
!ll&&!rl&&r
016
defined $form_id and length $form_id and defined $version
!ll&&!rl&&r
007
defined $form_id and length $form_id
!ll&&!rl&&r
007
MC/DC20%1/5
defined $form_id and length $form_id and defined $version and $version eq "v2" and defined $payload
defined $form_id length $form_id defined $version $version eq "v2" defined $payload
Truth table33%2/6
A and B and C and D and E
A= defined $form_idB= length $form_idC= defined $versionD= $version eq "v2"E= defined $payload
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
103 defined($form_id)
104 && length($form_id)
105 && defined($version)
106 && $version eq 'v2'
107 && defined($payload)
108 ) {
109 1 ▶ $c->log->debug('Malformed CSRF token') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 1 1
110 1 return $c->delegate_failed_csrf_token_check;
111 }
112  
113 6 my $session_key = join('_', $c->csrf_token_session_key, $form_id);
114 6 my $entry = $c->session->{$session_key};
115 6 ▶ unless ($entry) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($entry) 1 5 6
116 1 ▶ $c->log->debug('CSRF token not found in session') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 1 1
117 1 return $c->delegate_failed_csrf_token_check;
118 }
119  
120 5 ▶ if($c->single_use_csrf_token || $c->action->attributes->{SingleUseCSRF}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c->single_use_csrf_token or $c->action->attributes->{"SingleUseCSRF"}) 1 4 5
Condition66%2/3
$c->single_use_csrf_token or $c->action->attributes->{"SingleUseCSRF"}
l!l&&r!l&&!r
014
MC/DC50%1/2
$c->single_use_csrf_token or $c->action->attributes->{"SingleUseCSRF"}
$c->single_use_csrf_token $c->action->attributes->{"SingleUseCSRF"}
Truth table66%2/3
A or B
A= $c->single_use_csrf_tokenB= $c->action->attributes->{"SingleUseCSRF"}
ABresult
1X1
011
000
121 1 ▶ $c->log->debug('Deleting single-use CSRF token from session') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 1 1
122 1 delete $c->session->{$session_key};
123 }
124  
125 5 ▶ if ((time - $entry->{created}) > $c->csrf_max_age) {
Branch: 1 branch
BranchTrueFalseTotal
if (time - $entry->{"created"} > $c->csrf_max_age) 0 5 5
126 0 ▶ $c->log->debug('CSRF token expired') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 0 0
127 0 return $c->delegate_failed_csrf_token_check;
128 }
129  
130 5 my $expected_token = $c->_csrf_expected_token($entry);
131 5 my $candidate_token = $c->_unmask_csrf_token($payload, length($expected_token));
132  
133 5 ▶ unless (
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $candidate_token and $c->secure_compare($candidate_token, $expected_token)) 1 4 5
Condition66%2/3
defined $candidate_token and $c->secure_compare($candidate_token, $expected_token)
!ll&&!rl&&r
014
MC/DC50%1/2
defined $candidate_token and $c->secure_compare($candidate_token, $expected_token)
defined $candidate_token $c->secure_compare($candidate_token, $expected_token)
Truth table66%2/3
A and B
A= defined $candidate_tokenB= $c->secure_compare($candidate_token, $expected_token)
ABresult
0X0
100
111
134 defined($candidate_token)
135 && $c->secure_compare($candidate_token, $expected_token)
136 ) {
137 1 ▶ $c->log->debug('CSRF token mismatch') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 1 1
138 1 return $c->delegate_failed_csrf_token_check;
139 }
140 4 ▶ $c->log->debug('CSRF token check passed') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 4 4
141  
142 4 return 1;
143 }
144  
145 8 ▶sub find_csrf_token_in_request {
Subroutine find_csrf_token_in_request: called CC=6 SCAR=23.5
Pod undocumented
146 8 my $c = shift;
147 8 ▶ if(my $header_token = $c->request->header('X-CSRF-Token')) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $header_token = $c->request->header('X-CSRF-Token')) { } 1 7 8
148 1 ▶ $c->log->debug('Found CSRF token in request header') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 1 1
149 1 return $header_token;
150 } else {
151 return $c->req->body_parameters->{$c->csrf_token_param_key}
152 7 ▶ if exists($c->req->body_parameters->{$c->csrf_token_param_key});
Branch: 1 branch
BranchTrueFalseTotal
if exists $c->req->body_parameters->{$c->csrf_token_param_key} 7 0 7
153 return $c->req->body_data->{$c->csrf_token_param_key}
154 0 ▶ if exists($c->req->body_data->{$c->csrf_token_param_key});
Branch: 1 branch
BranchTrueFalseTotal
if exists $c->req->body_data->{$c->csrf_token_param_key} 0 0 0
155 0 ▶ $c->log->debug('No CSRF token found in request') if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 0 0
156 0 return undef;
157 }
158 }
159  
160 4 ▶sub csrf_token {
Subroutine csrf_token: called CC=9 SCAR=22.5
Pod documented
161 4 my ($c, %args) = @_;
162  
163 $c->log->warn("'session' argument is deprecated and will be removed in a future release")
164 4 ▶ if exists($args{session});
Branch: 1 branch
BranchTrueFalseTotal
if exists $args{"session"} 0 4 4
165 $c->log->warn("'token_secret' argument is deprecated and will be removed in a future release")
166 4 ▶ if exists($args{token_secret});
Branch: 1 branch
BranchTrueFalseTotal
if exists $args{"token_secret"} 0 4 4
167  
168 4 ▶ my $form_id = $args{form_id} || 'default';
Condition100%2/2
$args{'form_id'} || 'default'
l!l
22
MC/DC100%1/1
$args{'form_id'} || 'default'
$args{'form_id'}
Truth table100%2/2
A
A= $args{'form_id'}
Aresult
11
00
169 4 my $session_key = join('_', $c->csrf_token_session_key, $form_id);
170 4 my $entry = $c->session->{$session_key};
171  
172 4 ▶ if (!$entry || time - $entry->{created} > $c->csrf_max_age) {
Branch: 1 branch
BranchTrueFalseTotal
if (not $entry or time - $entry->{'created'} > $c->csrf_max_age) { } 2 2 4
Condition66%2/3
not $entry or time - $entry->{"created"} > $c->csrf_max_age
l!l&&r!l&&!r
202
MC/DC50%1/2
not $entry or time - $entry->{"created"} > $c->csrf_max_age
not $entry time - $entry->{"created"} > $c->csrf_max_age
Truth table66%2/3
not(A) or B
A= not $entryB= time - $entry->{"created"} > $c->csrf_max_age
ABresult
1X1
011
000
173 2 ▶ $c->log->debug("Generating new CSRF token for form ID '$form_id'") if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 2 2
174 2 $entry = {
175 value => encode_base64url(urandom(32)),
176 created => time,
177 };
178 2 $c->session->{$session_key} = $entry;
179 } else {
180 2 ▶ $c->log->debug("Reusing existing CSRF token for form ID '$form_id'") if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 2 2
181 }
182  
183 4 my $expected_token = $c->_csrf_expected_token($entry);
184 4 my $payload = $c->_mask_csrf_token($expected_token);
185 4 my $token = "$form_id:v2:$payload";
186  
187 4 ▶ $c->log->debug("Using masked CSRF token for form ID '$form_id'") if $c->debug;
Branch: 1 branch
BranchTrueFalseTotal
if $c->debug 0 4 4
188  
189 4 return $token;
190 }
191  
192 11 ▶sub _csrf_expected_token {
Subroutine _csrf_expected_token: called CC=2 SCAR=6.9
193 11 my ($c, $entry) = @_;
194 11 my $expected_token = $entry->{value};
195 11 my $secret = $c->csrf_default_secret;
196  
197 11 ▶ if (defined $secret) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $secret) 10 1 11
198 10 $expected_token = hmac_sha256_hex($expected_token, $secret);
199 }
200  
201 11 return $expected_token;
202 }
203  
204 9 ▶sub _mask_csrf_token {
Subroutine _mask_csrf_token: called CC=3 SCAR=11.8
205 9 my ($c, $expected_token) = @_;
206 9 ▶ return undef unless defined $expected_token && length $expected_token;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $expected_token and length $expected_token 0 9 9
Condition33%1/3
defined $expected_token and length $expected_token
!ll&&!rl&&r
009
MC/DC0%0/2
defined $expected_token and length $expected_token
defined $expected_token length $expected_token
Truth table33%1/3
A and B
A= defined $expected_tokenB= length $expected_token
ABresult
0X0
100
111
207  
208 9 my $mask = urandom(length($expected_token));
209 9 my $masked_token = $mask ^ $expected_token;
210  
211 9 return encode_base64url($mask.$masked_token);
212 }
213  
214 14 ▶sub _unmask_csrf_token {
Subroutine _unmask_csrf_token: called CC=8 SCAR=20.8
215 14 my ($c, $payload, $expected_length) = @_;
216 14 ▶ return undef unless defined $payload
Branch: 1 branch
BranchTrueFalseTotal
unless defined $payload and length $payload and $payload =~ /\A[A-Za-z0-9_-]+\z/ and defined $expected_length and $expected_length > 0 5 9 14
Condition91%11/12
defined $payload and length $payload and $payload =~ /\A[A-Za-z0-9_-]+\z/ and defined $expected_length and $expected_length > 0
!ll&&!rl&&r
419
defined $payload and length $payload and $payload =~ /\A[A-Za-z0-9_-]+\z/ and defined $expected_length
!ll&&!rl&&r
4010
defined $payload and length $payload and $payload =~ /\A[A-Za-z0-9_-]+\z/
!ll&&!rl&&r
2210
defined $payload and length $payload
!ll&&!rl&&r
1112
MC/DC80%4/5
defined $payload and length $payload and $payload =~ /\A[A-Za-z0-9_-]+\z/ and defined $expected_length and $expected_length > 0
defined $payload length $payload $payload =~ /\A[A-Za-z0-9_-]+\z/ defined $expected_length $expected_length > 0
Truth table83%5/6
A and B and C and D and E
A= defined $payloadB= length $payloadC= $payload =~ /\A[A-Za-z0-9_-]+\z/D= defined $expected_lengthE= $expected_length > 0
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
217 && length($payload)
218 && $payload =~ /\A[A-Za-z0-9_-]+\z/
219 && defined($expected_length)
220 && $expected_length > 0;
221  
222 9 my $decoded = decode_base64url($payload);
223 9 ▶ return undef unless encode_base64url($decoded) eq $payload;
Branch: 1 branch
BranchTrueFalseTotal
unless encode_base64url($decoded) eq $payload 0 9 9
224 9 ▶ return undef unless length($decoded) == $expected_length * 2;
Branch: 1 branch
BranchTrueFalseTotal
unless length $decoded == $expected_length * 2 2 7 9
225  
226 7 my $mask = substr($decoded, 0, $expected_length);
227 7 my $masked_token = substr($decoded, $expected_length, $expected_length);
228  
229 7 return $mask ^ $masked_token;
230 }
231  
232 5 ▶sub secure_compare {
Subroutine secure_compare: called CC=5 SCAR=17.5
Pod undocumented
233 5 my ($c, $a, $b) = @_;
234 5 ▶ return 0 unless defined $a && defined $b && length $a == length $b;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $a and defined $b and length $a == length $b 0 5 5
Condition33%2/6
defined $a and defined $b and length $a == length $b
!ll&&!rl&&r
005
defined $a and defined $b
!ll&&!rl&&r
005
MC/DC0%0/3
defined $a and defined $b and length $a == length $b
defined $a defined $b length $a == length $b
Truth table25%1/4
A and B and C
A= defined $aB= defined $bC= length $a == length $b
ABCresult
0XX0
10X0
1100
1111
235  
236 5 my $res = 0;
237 5 ▶ for (my $i = 0; $i < length($a); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < length $a) 320 5 325
238 320 $res |= ord(substr($a, $i)) ^ ord(substr($b, $i));
239 }
240 5 return $res == 0;
241 }
242  
243 0 ▶sub random_token {
Subroutine random_token: not called CC=2 SCAR=17.9
Pod documented
244 0 my ($c, $length) = @_;
245 0 ▶ $length ||= 48;
Condition0%0/2
$length ||= 48
l!l
00
MC/DC0%0/1
$length ||= 48
$length
Truth table0%0/2
A
A= $length
Aresult
11
00
246 0 return encode_base64url(urandom($length));
247 }
248  
249 4 ▶sub delegate_failed_csrf_token_check {
Subroutine delegate_failed_csrf_token_check: called CC=3 SCAR=11.1
Pod documented
250 4 my $c = shift;
251  
252 # Allow controller to handle failed CSRF token check
253 4 ▶ return $c->controller->handle_failed_csrf_token_check($c)
Branch: 1 branch
BranchTrueFalseTotal
if $c->controller->can("handle_failed_csrf_token_check") 0 4 4
254 if $c->controller->can('handle_failed_csrf_token_check');
255 4 ▶ return $c->handle_failed_csrf_token_check
Branch: 1 branch
BranchTrueFalseTotal
if $c->can("handle_failed_csrf_token_check") 0 4 4
256 if $c->can('handle_failed_csrf_token_check');
257  
258 4 $c->response->status(403);
259 4 $c->response->content_type('text/plain');
260 4 $c->response->body('Forbidden: Invalid CSRF token.');
261 4 $c->finalize;
262  
263 4 Catalyst::Exception->throw(message => 'csrf_token failed validation');
264 }
265  
266 2 1;
267  
268 __END__
↑ Summary