Commit 22430751 authored by Xavier Guimard's avatar Xavier Guimard

Merge branch 'v2.0'

parents 0cbbb759 f3c4ea0a
......@@ -46,7 +46,7 @@ ErrorDocument 503 http://auth.__DNSDOMAIN__/lmerror/503
#</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -63,7 +63,7 @@ ErrorDocument 503 http://auth.__DNSDOMAIN__/lmerror/503
#</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -53,7 +53,7 @@ ErrorDocument 503 http://auth.__DNSDOMAIN__/lmerror/503
#</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -94,5 +94,5 @@
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -107,5 +107,5 @@
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -91,5 +91,5 @@
</Directory>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -36,7 +36,7 @@ server {
#uwsgi_param SCRIPT_NAME $sc;
# Uncomment this if you use https only
#add_header Strict-Transport-Security "15768000";
#add_header Strict-Transport-Security "max-age=15768000";
}
location / {
......
......@@ -103,6 +103,6 @@
</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -128,6 +128,6 @@
</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -104,6 +104,6 @@
</Location>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -54,7 +54,7 @@ server {
try_files $uri $uri/ =404;
# Uncomment this if you use https only
#add_header Strict-Transport-Security max-age=15768000;
#add_header Strict-Transport-Security "max-age=15768000";
}
location /static/ {
......
......@@ -43,5 +43,5 @@ PerlModule Lemonldap::NG::Handler::ApacheMP2::Menu
</IfModule>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -43,5 +43,5 @@ PerlModule Lemonldap::NG::Handler::ApacheMP2::Menu
</IfModule>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -38,5 +38,5 @@ PerlModule Lemonldap::NG::Handler::ApacheMP2::Menu
</IfModule>
# Uncomment this if site if you use SSL only
#Header set Strict-Transport-Security 15768000
#Header set Strict-Transport-Security "max-age=15768000"
</VirtualHost>
......@@ -86,7 +86,7 @@ server {
#fastcgi_param HTTP_COOKIE $lmcookie;
# Uncomment this if you use https only
#add_header Strict-Transport-Security "15768000";
#add_header Strict-Transport-Security "max-age=15768000";
# Set REMOTE_USER (for FastCGI apps only)
#fastcgi_param REMOTE_USER $lmremote_user;
......
......@@ -21,7 +21,7 @@ sub TIEHASH {
modified => 0,
};
foreach (
qw(baseUrl user password realm localStorage localStorageOptions lwpOpts lwpSslOpts)
qw(baseUrl user password realm localStorage localStorageOptions lwpOpts lwpSslOpts kind)
)
{
$self->{$_} = $args->{$_};
......@@ -116,8 +116,13 @@ sub ua {
sub getJson {
my $self = shift;
my $url = shift;
my $resp = $self->ua->get( $self->base . $url, @_ );
my $id = shift;
my $resp = $self->ua->get(
$self->base
. $id
. ( $self->{kind} ne 'SSO' ? "?kind=$self->{kind}" : '' ),
@_
);
if ( $resp->is_success ) {
my $res;
eval { $res = from_json( $resp->content, { allow_nonref => 1 } ) };
......@@ -155,7 +160,7 @@ sub get {
}
# No cache, use REST and set cache
my $res = $self->getJson("$id") or return 0;
my $res = $self->getJson($id) or return 0;
$self->{data} = $res;
$self->cache->set( "rest$id", $self->{data} ) if $self->{localStorage};
......
......@@ -113,8 +113,8 @@ sub load {
$Lemonldap::NG::Common::Conf::msg .= "YAML fails to read file: $@ \n";
return undef;
}
foreach (keys $ret) {
if($_ =~ $boolKeys) {
foreach ( keys %$ret ) {
if ( $_ =~ $boolKeys ) {
$ret->{$_} = $ret->{$_} ? 1 : 0;
}
}
......
......@@ -53,7 +53,7 @@ sub serviceToXML {
$template->param( $_, $self->getValue( $_, $conf ) );
}
# When asked to provide only IDP metadata, take into account EntityID override
# When asked to provide only IDP metadata, take into account EntityID override
if ( $type eq "idp" and $conf->{samlOverrideIDPEntityID} ) {
$template->param( 'samlEntityID', $conf->{samlOverrideIDPEntityID} );
}
......
......@@ -139,6 +139,14 @@ sub BUILD {
# Load session data into object
if ($data) {
if ( $self->kind and $data->{_session_kind} ) {
unless ( $data->{_session_kind} eq $self->kind ) {
$self->error(
"Session kind mismatch : $data->{_session_kind} is not "
. $self->kind );
return undef;
}
}
$self->_save_data($data);
$self->kind( $data->{_session_kind} );
$self->id( $data->{_session_id} );
......@@ -158,7 +166,7 @@ sub _tie_session {
if ( $self->storageModule =~ /^Lemonldap::NG::Common::Apache::Session/ )
{
tie %h, $self->storageModule, $self->id,
{ %{ $self->options }, %$options };
{ %{ $self->options }, %$options, kind => $self->kind };
}
else {
tie %h, 'Lemonldap::NG::Common::Apache::Session', $self->id,
......
......@@ -248,7 +248,7 @@ sub getApacheSession {
Lemonldap::NG::Handler::PSGI::Main->tsv->{sessionCacheOptions},
id => $id,
force => $force,
kind => $mod->{kind},
( $id ? () : ( kind => $mod->{kind} ) ),
( $info ? ( info => $info ) : () ),
}
);
......@@ -271,6 +271,9 @@ sub getMod {
$self->error('Unknown (or unconfigured) session type');
return ();
}
if ( my $kind = $req->params('kind') ) {
$m->{kind} = $kind;
}
return $m;
}
......
......@@ -377,15 +377,15 @@ sub headersInit {
$class->tsv->{headerList}->{$vhost} = [ keys %headers ];
my $sub = '';
foreach ( keys %headers ) {
my $val = $class->substitute( $headers{$_} );
$sub .= "('$_' => $val || ''),";
my $val = $class->substitute( $headers{$_} ) . " || ''";
$sub .= "('$_' => $val),";
}
unless ( $class->tsv->{forgeHeaders}->{$vhost} =
$class->buildSub($sub) )
{
$class->tsv->{maintenance}->{$vhost} = 1;
$class->logger->error( "$class Unable to forge headers: "
$class->logger->error( "$class Unable to forge $vhost headers: "
. $class->tsv->{jail}->error );
}
}
......
......@@ -203,6 +203,7 @@ t/05-rest-api.t
t/06-rest-api.t
t/07-utf8.t
t/10-save-unchanged-conf.t
t/11-save-appCat-changed-conf.t
t/11-save-changed-conf-with-confirmation.t
t/12-save-changed-conf.t
t/14-bad-changes-in-conf.t
......@@ -220,6 +221,7 @@ t/99-pod.t
t/conf/lmConf-1.json
t/jsonfiles/01-base-tree.json
t/jsonfiles/02-base-tree-all-nodes-opened.json
t/jsonfiles/03-base-tree-appCat-modifed.json
t/jsonfiles/11-modified-with-confirmation.json
t/jsonfiles/12-modified.json
t/jsonfiles/14-bad.json
......
......@@ -140,14 +140,15 @@ sub tplParams {
sub javascript {
my ( $self, $req ) = @_;
my $res = $self->diffRule->( $req, $req->{userData} ) || 0;
my $res = $self->diffRule->( $req, $req->{userData} ) || 0;
my $impPrefix = $self->{impersonationPrefix};
my $ttl = $self->{timeout} || 72000;
my $ttl = $self->{timeout} || 72000;
return
'var formPrefix=staticPrefix+"forms/";var confPrefix=scriptname+"confs/";var viewPrefix=scriptname+"view/";'
. 'var allowDiff=' . "$res;"
. 'var impPrefix=' . "'" . $impPrefix . "'" . ';'
. 'var impPrefix=' . "'"
. $impPrefix . "'" . ';'
. 'var sessionTTL=' . "$ttl;"
. ( $self->links ? 'var links=' . to_json( $self->links ) . ';' : '' )
. (
......
......@@ -536,21 +536,24 @@ sub _scanNodes {
}
);
@listCatRef = map { $_ ? $_ : () } @listCatRef;
@listCatNew = map { $_ ? $_ : () } @listCatNew;
@listCatRef = sort @listCatRef;
@listCatNew = sort @listCatNew;
hdebug( '# @listCatRef : ' . \@listCatRef );
hdebug( '# @listCatNew : ' . \@listCatNew );
for ( my $i = 0 ; $i < @listCatNew ; $i++ ) {
if ( not( defined $listCatRef[$i] )
or $listCatRef[$i] ne $listCatNew[$i] )
{
push @{ $self->changes },
{
key => $leaf->{id},
new => $listCatNew[$i],
old => $listCatRef[$i]
};
}
hdebug( '# @listCatRef : ', \@listCatRef );
hdebug( '# @listCatNew : ', \@listCatNew );
# Check for deleted
my @diff =
grep !${ { map { $_, 1 } @listCatNew } }{$_}, @listCatRef;
if ( scalar @diff ) {
$self->confChanged(1);
push @{ $self->changes },
{
new => join( ', ', 'categoryList', @listCatNew ),
key => join( ', ', 'Deletes in cat(s)', @diff ),
old => join( ', ', 'categoryList', @listCatRef ),
};
}
}
next;
......
......@@ -646,7 +646,8 @@ sub tests {
# Warn if Impersonation is enabled without prefix
impersonationPrefix => sub {
return 1 unless ( $conf->{impersonationRule} );
return ( 1, "Impersonation is enabled without real attributes prefix" )
return ( 1,
"Impersonation is enabled without real attributes prefix" )
unless ( $conf->{impersonationPrefix} );
# Return
......
......@@ -149,8 +149,8 @@ sub zeroConf {
'locationRules' => {
"auth.$domain" => {
'(?#checkUser)^/checkuser' => '$uid eq "dwho"',
'(?#errors)^/lmerror/' => 'accept',
'default' => 'accept'
'(?#errors)^/lmerror/' => 'accept',
'default' => 'accept'
},
"test1.$domain" => {
'default' => 'accept',
......@@ -162,7 +162,8 @@ sub zeroConf {
},
"manager.$domain" => {
'default' => '$uid eq "dwho" or $uid eq "rtyler"',
'(?#Configuration)^/(manager\.html|confs|$)' => '$uid eq "dwho"',
'(?#Configuration)^/(manager\.html|confs|$)' =>
'$uid eq "dwho"',
'(?#Sessions)/sessions' => '$uid eq "dwho" or $uid eq "rtyler"',
'(?#Notifications)/notifications' =>
'$uid eq "dwho" or $uid eq "rtyler"',
......
......@@ -53,7 +53,7 @@ sub addRoutes {
$self->{ipField} ||= 'ipAddr';
$self->{multiValuesSeparator} ||= '; ';
$self->{impersonationPrefix} = $conf->{impersonationPrefix} || 'real_';
$self->{impersonationPrefix} = $conf->{impersonationPrefix} || 'real_';
$self->{hiddenAttributes} //= "_password";
}
......
......@@ -694,7 +694,9 @@ llapp.controller 'TreeCtrl', [
if typeof node.data == 'string' and node.data.match /^(?:-1|0|1)$/
node.data = parseInt(node.data, 10)
if node.type and node.type.match /^int$/
node.data = parseInt(node.data, 10)
node.data = parseInt(node.data, 10)
if node.type and node.type.match /^select$/
node.data = node.data.toString()
# Split SAML types
else if node.type and node.type.match(/^(saml(Service|Assertion)|blackWhiteList)$/) and not (typeof node.data == 'object')
node.data = node.data.split ';'
......
......@@ -842,6 +842,9 @@ This file contains:
}
if (node.type && node.type.match(/^int$/)) {
node.data = parseInt(node.data, 10);
}
if (node.type && node.type.match(/^select$/)) {
node.data = node.data.toString();
} else if (node.type && node.type.match(/^(saml(Service|Assertion)|blackWhiteList)$/) && !(typeof node.data === 'object')) {
node.data = node.data.split(';');
}
......
......@@ -254,7 +254,7 @@
"ext2fCodeActivation":"Code regex",
"ext2fAuthnLevel":"Authentication level",
"ext2fLogo":"Logo",
"ext2FSendCommand":"Send comand",
"ext2FSendCommand":"Send command",
"ext2FValidateCommand":"Validation command",
"facebookAppId":"Facebook application ID",
"facebookAppSecret":"Facebook application secret",
......@@ -758,7 +758,7 @@
"stateCheck":"State Check",
"stayConnected":"Persistent connections",
"successfullySaved":"Successfully saved",
"storePassword":"Store user password in session datas",
"storePassword":"Store user password in session",
"successLoginNumber":"Number of registered logins",
"sympaHandler":"Sympa",
"sympaMailKey":"Mail session key",
......
......@@ -254,7 +254,7 @@
"ext2fCodeActivation":"Code regex",
"ext2fAuthnLevel":"Authentication level",
"ext2fLogo":"Logo",
"ext2FSendCommand":"Send comand",
"ext2FSendCommand":"Send command",
"ext2FValidateCommand":"Validation command",
"facebookAppId":"Facebook application ID",
"facebookAppSecret":"Facebook application secret",
......@@ -758,7 +758,7 @@
"stateCheck":"State Check",
"stayConnected":"Persistent connections",
"successfullySaved":"Successfully saved",
"storePassword":"Store user password in session datas",
"storePassword":"Store user password in session",
"successLoginNumber":"Number of registered logins",
"sympaHandler":"Sympa",
"sympaMailKey":"Mail session key",
......
......@@ -130,7 +130,7 @@
"casSrvMetaDataOptionsGateway":"Authentification transparente",
"casSrvMetaDataOptionsIcon":"Chemin de l'icône",
"casSrvMetaDataOptionsSortNumber":"Ordre",
"casSrvMetaDataOptionsRenew":"Renouveller l'authentification",
"casSrvMetaDataOptionsRenew":"Renouveler l'authentification",
"casSrvMetaDataOptionsProxiedServices":"Services mandatés",
"casSrvMetaDataOptionsUrl":"URL du serveur",
"casSrvMetaDataNodes":"Serveurs CAS",
......@@ -145,7 +145,7 @@
"cspImg":"Sources des images",
"cspScript":"Sources des scripts",
"cspStyle":"Sources des styles",
"cspConnect":"Destinations des requêtes Ajax",
"cspConnect":"Destinations des requêtes AJAX",
"cspFont":"Sources des polices",
"cfgLog":"Résumé",
"cfgVersion":"Version de la configuration",
......@@ -276,7 +276,7 @@
"generalParameters":"Paramètres généraux",
"globalStorage":"Module Apache::Session",
"globalStorageOptions":"Paramètres du module Apache::Session",
"gpgAuthnLevel":"Niveau d'authentication",
"gpgAuthnLevel":"Niveau d'authentification",
"gpgDb":"Base de données GPG",
"gpgParams":"Paramètres GPG",
"grantSessionRules":"Conditions d'ouverture",
......@@ -331,8 +331,8 @@
"issuerDBOpenIDConnectRule":"Règle d'utilisation",
"issuerParams":"Modules fournisseur",
"jsRedirect":"Message de redirection",
"jqueryButtonSelector":"Selecteur jQuery du bouton (optionnel)",
"jqueryFormSelector":"Selecteur jQuery du formulaire (optionnel)",
"jqueryButtonSelector":"Sélecteur jQuery du bouton (optionnel)",
"jqueryFormSelector":"Sélecteur jQuery du formulaire (optionnel)",
"jqueryUrl":"URL jQuery (optionnel)",
"key":"Clef de chiffrement",
"keys":"Clefs",
......@@ -623,13 +623,13 @@
"portalErrorOnExpiredSession":"Affiche une erreur si la session est expirée",
"portalErrorOnMailNotFound":"Affiche une erreur si le mail n'est pas trouvé",
"portalForceAuthn":"Authentification forcée",
"portalForceAuthnInterval":"Interval d'authentification forcée",
"portalForceAuthnInterval":"Intervalle d'authentification forcée",
"portalMenu":"Menu",
"portalModules":"Modules",
"portalOpenLinkInNewWindow":"Nouvelle fenêtre",
"portalOther":"Autres",
"portalParams":"Portail",
"portalPingInterval":"Interval du ping",
"portalPingInterval":"Intervalle du ping",
"portalRedirection":"Redirections du Portail",
"portalRequireOldPassword":"Ancien mot de passe requis",
"portalServers":"Serveurs du portail",
......@@ -656,7 +656,7 @@
"radiusParams":"Paramètres Radius",
"radiusSecret":"Secret partagé",
"radiusServer":"Nom d'hôte du serveur",
"randomPasswordRegexp":"Expression regulière pour la génération des mots de passe",
"randomPasswordRegexp":"Expression régulière pour la génération des mots de passe",
"readOnlyMode":"Mode lecture seule",
"redirectFormMethod":"Méthode du formulaire de redirection",
"redirection":"Redirections du Handler",
......@@ -679,7 +679,7 @@
"remotePortal":"URL du portail",
"replaceByFile":"Remplacer par le fichier",
"requireToken":"Exige un jeton pour les formulaires",
"restAuthnLevel":"Niveau d'authentication",
"restAuthnLevel":"Niveau d'authentification",
"restAuthUrl":"URL d'authentification",
"restConfigServer":"Serveur de configurations REST",
"restore":"Restaurer",
......@@ -905,7 +905,7 @@
"samlIDPMetaDataOptionsSecurity":"Sécurité",
"samlIDPMetaDataOptionsSortNumber":"Ordre",
"samlIDPMetaDataOptionsStoreSAMLToken":"Conserver le jeton SAML",
"samlIDPMetaDataOptionsRelayStateURL":"Pemettre une URL dans le RelayState",
"samlIDPMetaDataOptionsRelayStateURL":"Permettre une URL dans le RelayState",
"samlIDPMetaDataOptionsUserAttribute":"Attribut contenant l'identité de l'utilisateur",
"samlSPMetaDataNodes":"Fournisseurs de service SAML",
"samlSPMetaDataXML":"Metadonnées",
......
......@@ -509,8 +509,8 @@
"oidcRPMetaDataOptionsLogoutType":"Tipo",
"oidcRPMetaDataOptionsLogoutUrl":"URL",
"oidcOPMetaDataOptionsProtocol":"Protocollo",
"oidcRPMetaDataOptionsPublic":"Public client",
"oidcRPMetaDataOptionsRequirePKCE":"Require PKCE",
"oidcRPMetaDataOptionsPublic":"Cliente pubblico",
"oidcRPMetaDataOptionsRequirePKCE":"Richiedi PKCE",
"oidcRPMetaDataOptionsRule":"Regola di accesso",
"oidcOPMetaDataOptionsScope":"Scopo",
"oidcOPMetaDataOptionsStoreIDToken":"Immagazzina ID Token",
......@@ -716,7 +716,7 @@
"session_s":"sessione(i)",
"sessionDataToRemember":"Dati di sessione da memorizzare",
"sessionDeleted":"La sessione è stata rimossa",
"sessionExpired":"The session is expired",
"sessionExpired":"La sessione è scaduta",
"sessionParams":"Sessioni",
"sessionStartedAt":"La sessione è stata avviata",
"sessionStorage":"Conservazione di sessioni",
......
......@@ -254,7 +254,7 @@
"ext2fCodeActivation":"Code regex",
"ext2fAuthnLevel":"认证级别",
"ext2fLogo":"Logo",
"ext2FSendCommand":"Send comand",
"ext2FSendCommand":"Send command",
"ext2FValidateCommand":"Validation command",
"facebookAppId":"Facebook application ID",
"facebookAppSecret":"Facebook application secret",
......@@ -758,7 +758,7 @@
"stateCheck":"State Check",
"stayConnected":"Persistent connections",
"successfullySaved":"Successfully saved",
"storePassword":"Store user password in session datas",
"storePassword":"Store user password in session",
"successLoginNumber":"Number of registered logins",
"sympaHandler":"Sympa",
"sympaMailKey":"Mail session key",
......
# Verify that an unmodified configuration is rejected
use Data::Dumper;
use Test::More;
use strict;
use JSON;
require 't/test-lib.pm';
my @struct = qw[t/jsonfiles/03-base-tree-appCat-modifed.json];
my @desc = ('Changed conf with deleted Category');
my $confFiles = [ 't/conf/lmConf-1.json', 't/conf/lmConf-2.json' ];
sub body {
return 0 unless (@struct);
my $t = shift @struct;
return IO::File->new( $t, 'r' );
}
# Delete lmConf-2.json if exists
eval { unlink $confFiles->[1]; };
mkdir 't/sessions';
# Try to save a modified conf
while ( my $body = &body() ) {
my $desc = shift @desc;
my ( $res, $resBody );
ok(
$res =
&client->_post( '/confs/', 'cfgNum=1', $body, 'application/json' ),
"$desc: positive result"
);
ok( $res->[0] == 200, "$desc: result code is 200" )
or print STDERR Dumper($res);
ok(
$resBody = from_json( $res->[2]->[0] ),
"$desc: result body contains JSON text"
);
#print STDERR Dumper($resBody);
ok( $resBody->{result} == 1, "$desc: JSON response contains \"result:1\"" );
ok( @{ $resBody->{details}->{__changes__} } eq 1,
"$desc: conf has changed" )
or print STDERR Dumper($resBody);
ok(
$resBody->{details}->{__changes__}->[0]->{new} eq
'categoryList, Administration, Documentation',
"$desc: new key received"
) or print STDERR Dumper($resBody);
ok(
$resBody->{details}->{__changes__}->[0]->{old} eq
'categoryList, Administration, Documentation, Sample applications',
"$desc: old key received"
) or print STDERR Dumper($resBody);
ok(
$resBody->{details}->{__changes__}->[0]->{key} eq
'Deletes in cat(s), Sample applications',
"$desc: key received"
) or print STDERR Dumper($resBody);
ok( -e $confFiles->[1], "$desc: file is created" );
#print STDERR Dumper($resBody);
count(9);
}
eval { unlink $confFiles->[1]; rmdir 't/sessions'; };
done_testing( count() );
# Remove sessions directory
`rm -rf t/sessions`;
......@@ -39,7 +39,7 @@ foreach my $i ( 0 .. 1 ) {
ok(
@{ $resBody->{details}->{__changes__} } == 20,
'JSON response contains 24 changes'
'JSON response contains 20 changes'
) or print STDERR Dumper($resBody);
#print STDERR Dumper($resBody);
......
......@@ -64,7 +64,7 @@ count(2);
# Try to display previous conf
$res = &client->jsonResponse('/view/1');
ok( $res->{cfgNum} eq '1', 'Browser is allowed' )
or print STDERR Dumper($res);
or print STDERR Dumper($res);
count(1);
# Remove new conf
......
......@@ -493,11 +493,13 @@ t/40-Notifications-XML-DBI.t
t/40-Notifications-XML-File.t
t/40-Notifications-XML-Server.t
t/41-Captcha.t
t/41-Token-Global-Storage.t
t/41-Token.t
t/42-Register-Demo-with-captcha.t
t/42-Register-Demo-with-token.t
t/42-Register-Demo.t
t/42-Register-LDAP.t
t/42-Register-Security.t
t/43-MailPasswordReset-Choice.t
t/43-MailPasswordReset-DBI.t
t/43-MailPasswordReset-LDAP.t
......
......@@ -305,7 +305,7 @@ sub run {
$self->logger->debug(
"Delete 2F Device : { type => 'TOTP', epoch => $epoch }");
$self->p->updatePersistentSession( $req,
{ _2fDevices => to_json( $_2fDevices ) } );
{ _2fDevices => to_json($_2fDevices) } );
$self->userLogger->notice('TOTP deletion succeed');
return [
200,
......
......@@ -292,7 +292,7 @@ sub run {
$self->logger->debug(
"Delete 2F Device : { type => 'U2F', epoch => $epoch }");
$self->p->updatePersistentSession( $req,
{ _2fDevices => to_json( $_2fDevices ) } );
{ _2fDevices => to_json($_2fDevices) } );
$self->userLogger->notice('U2F key unregistration succeed');