Bugzilla – Attachment 135414 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.17 KB, created by
David Nind
on 2022-05-26 23:30:02 UTC
(
hide
)
Description:
Bug 30842: 2FA - Allow at least one old TOTP
Filename:
MIME Type:
Creator:
David Nind
Created:
2022-05-26 23:30:02 UTC
Size:
1.17 KB
patch
obsolete
>From 7904f87ad3971dbfbc592658a899574298bdfb55 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 > >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> >--- > 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.30.2
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