Bugzilla – Attachment 135417 Details for
Bug 30842
Two-factor authentication code should be valid longer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30842: 2FA - Allow at least one old TOTP
Bug-30842-2FA---Allow-at-least-one-old-TOTP.patch (text/plain), 1.27 KB, created by
Marcel de Rooy
on 2022-05-27 08:56:59 UTC
(
hide
)
Description:
Bug 30842: 2FA - Allow at least one old TOTP
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-05-27 08:56:59 UTC
Size:
1.27 KB
patch
obsolete
>From 27b3ee08d308c8b9c52bacc8e9dc627ed7dfb85d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 25 May 2022 10:04:58 +0200 >Subject: [PATCH] Bug 30842: 2FA - Allow at least one old TOTP >Content-Type: text/plain; charset=utf-8 > >We allow one old token when we are setting the two-factor auth, we >should reuse the same settings when validation the authentication >itself. > >Test plan: >Setup 2FA for your logged-in user >Logout/Login >Have a look at the code and wait for 30 sec before using it (< 1min >however) > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 96d8feb773..a44cd09767 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -911,7 +911,7 @@ sub checkauth { > { > my $patron = Koha::Patrons->find( { userid => $userid } ); > my $auth = Koha::Auth::TwoFactorAuth->new( { patron => $patron } ); >- my $verified = $auth->verify($otp_token); >+ my $verified = $auth->verify($otp_token, 1); > $auth->clear; > if ( $verified ) { > # The token is correct, the user is fully logged in! >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30842
:
135333
|
135414
| 135417