From a39825d1a1b0bd30dca796a9b1b7c6f54649aa1b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 27 Jul 2022 17:47:18 +0200 Subject: [PATCH] Bug 31247: Fix OPAC authentication when 2FA is enabled Silly mistake from bug 28786, the $type should be compared to "opac" instead of "OPAC", erk! Test plan: Turn 2FA on Set it up for an user Login at the OPAC => Without this patch you keep being redirected to the auth form screen => With this patch applied you are able to successfully login Signed-off-by: Caroline Cyr La Rose Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Tomas Cohen Arazi (cherry picked from commit e7bb0d2a5ed92a1c9fedd5611e5569f11bd47723) Signed-off-by: Lucas Gass --- C4/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 9d44366e49..0e9e1d23a5 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -861,7 +861,7 @@ sub checkauth { my $session; my $invalid_otp_token; - my $require_2FA = ( C4::Context->preference('TwoFactorAuthentication') && $type ne "OPAC" ) ? 1 : 0; + my $require_2FA = ( C4::Context->preference('TwoFactorAuthentication') && $type ne "opac" ) ? 1 : 0; # Basic authentication is incompatible with the use of Shibboleth, # as Shibboleth may return REMOTE_USER as a Shibboleth attribute, -- 2.39.5