diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm index bdf82b429..3831c003a 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/TOTP.pm @@ -171,7 +171,7 @@ sub run { $self->p->updatePersistentSession( $req, { _2fDevices => to_json( \@keep ) } ); $self->userLogger->notice('TOTP registration succeed'); - return [ 200, [ 'Content-Type' => 'application/json' ], + return [ 200, [ 'Content-Type' => 'application/json', 'Content-Length' => 12, ], ['{"result":1}'] ]; } @@ -304,7 +304,7 @@ sub run { $self->p->updatePersistentSession( $req, { _2fDevices => to_json( \@keep ) } ); $self->userLogger->notice('TOTP deletion succeed'); - return [ 200, [ 'Content-Type' => 'application/json' ], + return [ 200, [ 'Content-Type' => 'application/json', 'Content-Length' => 12, ], ['{"result":1}'] ]; } } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm index 609b17b67..bf43075ad 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/2F/Register/U2F.pm @@ -70,7 +70,7 @@ sub run { ], [$challenge] ]; - return [ 200, [ 'Content-Type' => 'application/json' ], [$challenge] ]; + # return twice ??? return [ 200, [ 'Content-Type' => 'application/json' ], [$challenge] ]; } if ( $action eq 'registration' ) { my ( $resp, $challenge );