Condition Coverage

blib/lib/CGI/Ex/Auth.pm
Criterion Covered Total %
condition 97 198 48.9


and 3 conditions

line !l l&&!r l&&r condition
51 29 0 0 $$form{$self->key_logout} and not $self->{'_logout_looking_for_user'}
97 10 2 3 $data->error and $data->{'allow_cookie_match'}
100 8 0 9 defined $cookie and length $cookie
105 1 1 1 $data and $self->check_form_user_against_cookie($user, $data->{'user'}, $data)
122 0 11 0 $data->{'type'} and $data->{'type'} eq "crypt"
209 1 0 5 defined $data and $data->error ne "Login expired"
1 5 0 defined $data and $data->error ne "Login expired" and $self->failed_sleep
267 0 0 0 $dom =~ s/^[\w\-]*\.// and $dom =~ /\./
466 0 0 21 defined($data->{'user'} = $self->cleanup_user($data->{'user'})) && length $data->{'user'}
536 21 0 0 $self->complex_plaintext and $copy =~ m[^ ([^/]+) / (\d+) / (-?\d+) / ([^/]*) / (.*) $]x
577 19 0 0 $data->{'plain_time'} and $data->{'expires_min'} > 0
19 0 0 $data->{'plain_time'} and $data->{'expires_min'} > 0 and $self->server_time - $data->{'plain_time'} > $data->{'expires_min'} * 60
17 0 2 $pass =~ m[^([./0-9A-Za-z]{2})([./0-9A-Za-z]{11})$] and crypt($data->{'test_pass'}, $1) eq $pass
592 0 2 0 $data->{'expires_min'} > 0 and $self->server_time - $data->{'cram_time'} > $data->{'expires_min'} * 60
607 0 0 0 $data->{'expires_min'} > 0 and $self->server_time - $data->{'cram_time'} > $data->{'expires_min'} * 60
661 12 0 0 defined $data->{'use_crypt'} and $data->{'use_crypt'}
1 11 0 defined $data->{'type'} and $data->{'type'} eq "crypt"
672 0 0 12 not $data->{'prefer_simple_cram'} and $array = eval { do { $self->secure_hash_keys } }
0 3 9 not $data->{'prefer_simple_cram'} and $array = eval { do { $self->secure_hash_keys } } and @$array
727 0 0 2 defined $form_user and defined $cookie_user

or 2 conditions

line l !l condition
85 0 8 delete $$form{$self->key_expires_min} || undef
136 16 0 shift() || {}
182 13 0 shift() || {}
203 4 9 $args->{'had_form_data'} || 0
297 1 3 $args->{'path'} || $self->cookie_path($key, $val) || '/'
311 0 29 +(shift())->{'key_logout'} ||= "cea_logout"
312 28 18 +(shift())->{'key_cookie'} ||= "cea_user"
313 37 18 +(shift())->{'key_user'} ||= "cea_user"
314 33 16 +(shift())->{'key_pass'} ||= "cea_pass"
315 13 13 +(shift())->{'key_time'} ||= "cea_time"
316 1 20 +(shift())->{'key_save'} ||= "cea_save"
317 14 20 +(shift())->{'key_expires_min'} ||= "cea_expires_min"
318 0 13 +(shift())->{'form_name'} ||= "cea_form"
319 0 13 +(shift())->{'key_verify'} ||= "cea_verify"
320 13 29 +(shift())->{'key_redirect'} ||= "cea_redirect"
321 0 15 +(shift())->{'key_loggedout'} ||= "loggedout"
322 0 0 +(shift())->{'bounce_on_logout'} ||= 0
323 0 3 +(shift())->{'secure_hash_keys'} ||= []
325 0 0 +(shift())->{'no_cookie_verify'} ||= 0
326 0 46 +(shift())->{'use_crypt'} ||= 0
327 0 20 +(shift())->{'use_blowfish'} ||= ""
328 6 23 $s->{'use_plaintext'} ||= 0
331 0 0 +(shift())->{'failed_sleep'} ||= 0
398 0 0 $_[0]{'template_args'} ||= {}
422 5 8 $data->{'user'} || ''
548 2 0 $6 || ''
655 17 0 $data->{'user'} || die('Missing user')

or 3 conditions

line l !l&&r !l&&!r condition
31 32 0 0 shift() || croak('Usage: CGI::Ex::Auth->new')
97 14 3 12 not ref $data or $data->error and $data->{'allow_cookie_match'}
122 5 0 11 $self->use_plaintext or $data->{'type'} and $data->{'type'} eq "crypt"
123 2 0 3 defined $use_session or defined $data->{'expires_min'}
143 6 10 0 scalar keys %{$self->cookies;} or $self->no_cookie_verify
202 0 13 0 $form->{$key_r} || $self->script_name . $self->path_info . (scalar keys %$form ? '?' . $self->cgix->make_form($form) : '')
235 27 0 0 +(shift())->{'script_name'} or $ENV{'SCRIPT_NAME'}
237 0 0 55 +(shift())->{'path_info'} or $ENV{'PATH_INFO'}
244 6 1 0 $self->{'cgix'} ||= "CGI::Ex"->new
250 71 0 0 $self->{'form'} ||= $self->cgix->get_form
256 47 3 0 $self->{'cookies'} ||= $self->cgix->get_cookies
285 1 0 3 $args->{'domain'} || $self->cookie_domain
286 1 0 3 $args->{'secure'} || $self->cookie_secure
287 0 0 4 $args->{'httponly'} || $self->cookie_httponly
288 1 1 2 $args->{'samesite'} || $self->cookie_samesite
344 0 0 0 $self->{'logout_redirect'} || $self->script_name . "?$form"
349 24 18 0 $self->{'js_uri_path'} ||= $self->script_name . "/js"
374 0 0 0 $args->{'include_path'} || $self->template_include_path
0 0 0 $args->{'INCLUDE_PATH'} ||= $args->{'include_path'} || $self->template_include_path
392 0 0 0 $self->{'template_obj'} || do { require Template::Alloy; 'Template::Alloy'->new($args) }
488 2 0 0 defined $pass or $data->error
580 0 0 2 not $data->{'secure_hash'} =~ /^sh\.(\d+)\.(\d+)$/ or $1 > $#$array
649 17 0 0 shift() || $self->last_auth_data
661 5 0 12 defined $data->{'use_plaintext'} ? $data->{'use_plaintext'} : $self->use_plaintext or defined $data->{'use_crypt'} and $data->{'use_crypt'}
0 0 12 defined $data->{'use_plaintext'} ? $data->{'use_plaintext'} : $self->use_plaintext or defined $data->{'use_crypt'} and $data->{'use_crypt'} or defined $data->{'type'} and $data->{'type'} eq "crypt"
688 0 0 17 $data->{'use_blowfish'} || $self->use_blowfish
838 0 0 0 $self->use_plaintext or $self->disable_simple_cram
898 0 0 0 $self->error || $self->{'user'} && $self->{'type'}