Bugzilla – Attachment 143265 Details for
Bug 32066
2FA: User could get stuck temporarily on login screen when disabling pref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32066: Check 2FA pref in check_cookie_auth
Bug-32066-Check-2FA-pref-in-checkcookieauth.patch (text/plain), 1.96 KB, created by
Kyle M Hall (khall)
on 2022-11-04 18:03:01 UTC
(
hide
)
Description:
Bug 32066: Check 2FA pref in check_cookie_auth
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-11-04 18:03:01 UTC
Size:
1.96 KB
patch
obsolete
>From 6dde09d2c5ed825ded74aa817214655a1b23c3e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 Nov 2022 07:47:24 +0000 >Subject: [PATCH] Bug 32066: Check 2FA pref in check_cookie_auth > >Test plan: > >Without this patch: >1. Set the syspref TwoFactorAuthentication (enforce or enabled) >2. Configure 2FA for a patron >3. Logout >4. Authenticate but don't enter the 2FA code >5. Switch off the syspref (disabled) [via another browser or so] >6. Patron is stuck on the [original] login screen. [Only removing > the session cookie would resolve it.] > >With this patch: >1. Follow the steps above again. But note that you can refresh > your browser window to get in now. >2. Verify that Auth.t passes now too. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Auth.pm | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index b6933e4cc6..8bd13e88e1 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1784,11 +1784,13 @@ sub check_cookie_auth { > $session->param('desk_id'), $session->param('desk_name'), > $session->param('register_id'), $session->param('register_name') > ); >- return ( "additional-auth-needed", $session ) >- if $session->param('waiting-for-2FA'); >+ if ( C4::Context->preference('TwoFactorAuthentication') ne 'disabled' ) { >+ return ( "additional-auth-needed", $session ) >+ if $session->param('waiting-for-2FA'); > >- return ( "setup-additional-auth-needed", $session ) >- if $session->param('waiting-for-2FA-setup'); >+ return ( "setup-additional-auth-needed", $session ) >+ if $session->param('waiting-for-2FA-setup'); >+ } > > return ( "ok", $session ); > } else { >-- >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 32066
:
143066
|
143067
|
143071
|
143072
|
143263
|
143264
| 143265