@ -233,12 +233,16 @@ sub sfa {
}
# Filter 2FA sessions if needed
$self->logger->debug("Filtering 2F sessions...");
my $all = ( keys %$res );
if ( $self->{U2FCheck} eq '2' ) {
foreach my $session ( keys %$res ) {
delete $res->{$session}
unless ( defined $res->{$session}->{_2fDevices}
and $res->{$session}->{_2fDevices} =~ /"type":\s*"U2F"/s );
$self->logger->debug("Removing sessions unless U2F key registered");
if ( $self->{TOTPCheck} eq '2' ) {
@ -246,6 +250,7 @@ sub sfa {
and $res->{$session}->{_2fDevices} =~ /"type":\s*"TOTP"/s );
$self->logger->debug("Removing sessions unless TOTP secret registered");
if ( $self->{UBKCheck} eq '2' ) {
@ -253,9 +258,11 @@ sub sfa {
and $res->{$session}->{_2fDevices} =~ /"type":\s*"UBK"/s );
$self->logger->debug("Removing sessions unless UBK device registered");
my $total = ( keys %$res );
$self->logger->debug("Session(s) left : $total / $all");
if ( my $group = $req->params('groupBy') ) {
my $r;
@ -292,7 +292,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
over = 0
# Launch HTTP query
$http.get("#{scriptname}sfa/#{sessionType}?#{query}&U2FCheck=#{$scope.U2FCheck}&TOTPCheck=#{$scope.TOTPCheck}").then (response) ->
$http.get("#{scriptname}sfa/#{sessionType}?#{query}&U2FCheck=#{$scope.U2FCheck}&TOTPCheck=#{$scope.TOTPCheck}&UBKCheck=#{$scope.UBKCheck}").then (response) ->
data = response.data
if data.result
for n in data.values
@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.10.0
// Generated by CoffeeScript 1.9.3
/*
* 2ndFA Session explorer
@ -298,7 +298,7 @@
} else {
over = 0;
return $http.get(scriptname + "sfa/" + sessionType + "?" + query + "&U2FCheck=" + $scope.U2FCheck + "&TOTPCheck=" + $scope.TOTPCheck).then(function(response) {
return $http.get(scriptname + "sfa/" + sessionType + "?" + query + "&U2FCheck=" + $scope.U2FCheck + "&TOTPCheck=" + $scope.TOTPCheck + "&UBKCheck=" + $scope.UBKCheck).then(function(response) {
var data, i, len, n, ref;
data = response.data;
if (data.result) {