diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm
index 58e49b253dd2533475c1f3df2de375d9c59bbecb..241eb59129fb19609409920264aac0c37ba8c0ce 100644
--- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm
+++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Combination/Parser.pm
@@ -88,12 +88,12 @@ sub parseAnd {
my ( $r, $name ) = $obj->(@_);
# Case "string" (form type)
- if ( $r & ~$r ) {
+ if ( $r && $r & ~$r ) {
$str{$r}++;
}
else {
return ( wantarray ? ( $r, $name ) : $r )
- unless ( $r == PE_OK );
+ unless ( !$r || $r == PE_OK );
}
}
my $res = %str ? join( ',', keys %str ) : PE_OK;
diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
index 3735bbf0f132fb89c2d43c8f41d3e59d71777b62..15909872dce4eb58d1c36c913098003db3a49218 100644
--- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
+++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Yubikey.pm
@@ -122,7 +122,7 @@ sub _findYubikey {
}
}
- return $yubikey;
+ return $yubikey || '';
}
diff --git a/lemonldap-ng-portal/t/01-WebAuthn.t b/lemonldap-ng-portal/t/01-WebAuthn.t
index a713289f2d163cb8b48f9b97f267aed3c5d8537d..1e7d4632da3555f2eef3f5b338160033121becd3 100644
--- a/lemonldap-ng-portal/t/01-WebAuthn.t
+++ b/lemonldap-ng-portal/t/01-WebAuthn.t
@@ -80,7 +80,7 @@ ENDKEY
expectForm( $res, "", '/webauthn2fcheck', 'token', 'credential' );
my ($json) = $res->[2]->[0] =~
- m##ms;
+ m##ms;
ok( $json, "Found request object in JS data" );
$json = from_json($json);
my $request = $json->{request};