#1386 - Fix warnings
This commit is contained in:
parent
869166cb31
commit
53752276e4
|
@ -1,4 +1,4 @@
|
||||||
# Self U2F registration
|
# Self TOTP registration
|
||||||
package Lemonldap::NG::Portal::2F::Register::TOTP;
|
package Lemonldap::NG::Portal::2F::Register::TOTP;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -94,13 +94,14 @@ sub run {
|
||||||
{ _totp2fSecret => $token->{_totp2fSecret} } );
|
{ _totp2fSecret => $token->{_totp2fSecret} } );
|
||||||
|
|
||||||
my $list2FDevices = eval {
|
my $list2FDevices = eval {
|
||||||
|
$self->logger->debug("Looking for 2F Devices ...");
|
||||||
from_json( $req->userData->{list2FDevices}, { allow_nonref => 1 } );
|
from_json( $req->userData->{list2FDevices}, { allow_nonref => 1 } );
|
||||||
};
|
};
|
||||||
unless ($list2FDevices) {
|
unless ($list2FDevices) {
|
||||||
$self->logger->debug("No 2F Device found");
|
$self->logger->debug("No 2F Device found");
|
||||||
$list2FDevices = [];
|
$list2FDevices = [];
|
||||||
}
|
}
|
||||||
push $list2FDevices,
|
push @{$list2FDevices},
|
||||||
{
|
{
|
||||||
type => 'totp',
|
type => 'totp',
|
||||||
name => $TOTPName,
|
name => $TOTPName,
|
||||||
|
|
|
@ -65,6 +65,7 @@ sub run {
|
||||||
if ( $keyHandle and $userKey ) {
|
if ( $keyHandle and $userKey ) {
|
||||||
|
|
||||||
my $list2FDevices = eval {
|
my $list2FDevices = eval {
|
||||||
|
$self->logger->debug("Looking for 2F Devices ...");
|
||||||
from_json( $req->userData->{list2FDevices},
|
from_json( $req->userData->{list2FDevices},
|
||||||
{ allow_nonref => 1 } );
|
{ allow_nonref => 1 } );
|
||||||
};
|
};
|
||||||
|
@ -73,7 +74,7 @@ sub run {
|
||||||
$list2FDevices = [];
|
$list2FDevices = [];
|
||||||
}
|
}
|
||||||
my $keyName = $req->param('keyName');
|
my $keyName = $req->param('keyName');
|
||||||
push $list2FDevices,
|
push @{$list2FDevices},
|
||||||
{
|
{
|
||||||
type => 'U2F',
|
type => 'U2F',
|
||||||
name => $keyName,
|
name => $keyName,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Self Yubikey registration
|
||||||
package Lemonldap::NG::Portal::2F::Register::Yubikey;
|
package Lemonldap::NG::Portal::2F::Register::Yubikey;
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -44,6 +45,7 @@ sub run {
|
||||||
|
|
||||||
my $key = substr( $otp, 0, $self->conf->{yubikey2fPublicIDSize} );
|
my $key = substr( $otp, 0, $self->conf->{yubikey2fPublicIDSize} );
|
||||||
my $list2FDevices = eval {
|
my $list2FDevices = eval {
|
||||||
|
$self->logger->debug("Looking for 2F Devices ...");
|
||||||
from_json( $req->userData->{list2FDevices},
|
from_json( $req->userData->{list2FDevices},
|
||||||
{ allow_nonref => 1 } );
|
{ allow_nonref => 1 } );
|
||||||
};
|
};
|
||||||
|
@ -51,7 +53,7 @@ sub run {
|
||||||
$self->logger->debug("No 2F Device found");
|
$self->logger->debug("No 2F Device found");
|
||||||
$list2FDevices = [];
|
$list2FDevices = [];
|
||||||
}
|
}
|
||||||
push $list2FDevices,
|
push @{$list2FDevices},
|
||||||
{
|
{
|
||||||
type => 'UBK',
|
type => 'UBK',
|
||||||
name => $UBKName,
|
name => $UBKName,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user