Bugzilla – Attachment 168270 Details for
Bug 37104
Block AnonymousPatron from logging into anything
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37104: (Follow up) Restructure checkpw code
Bug-37104-Follow-up-Restructure-checkpw-code.patch (text/plain), 1.58 KB, created by
Martin Renvoize (ashimema)
on 2024-06-28 15:49:28 UTC
(
hide
)
Description:
Bug 37104: (Follow up) Restructure checkpw code
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-06-28 15:49:28 UTC
Size:
1.58 KB
patch
obsolete
>From c9adf5da3d39f4bd1c5ba503f8ef6799274fa805 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Mon, 17 Jun 2024 19:25:34 +0000 >Subject: [PATCH] Bug 37104: (Follow up) Restructure checkpw code > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth.pm | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 58a9f15d18e..57c05778d1d 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1418,8 +1418,8 @@ sub checkauth { > my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; > my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query ); > >- my $borrowernumber = $patron and $patron->borrowernumber; >- my $anonymous_patron = C4::Context->preference('AnonymousPatron'); >+ my $borrowernumber = $patron and $patron->borrowernumber; >+ my $anonymous_patron = C4::Context->preference('AnonymousPatron'); > my $is_anonymous_patron = $patron && ( $patron->borrowernumber eq $anonymous_patron ); > > $template->param( >@@ -2062,10 +2062,9 @@ sub checkpw { > @return = (); > } elsif ($passwd_ok) { > $patron->update( { login_attempts => 0 } ); >- if ( $patron->password_expired ) { >- @return = ( -2, $patron ); >- } > if ( $patron->borrowernumber eq $anonymous_patron ) { >+ @return = ( -3, $patron ); >+ } elsif ( $patron->password_expired ) { > @return = ( -2, $patron ); > } > } else { >-- >2.45.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 37104
:
167793
|
167795
|
167798
|
167801
|
167802
|
167811
|
167812
|
167813
|
168268
|
168269
| 168270 |
168592
|
168666
|
168694