Bugzilla – Attachment 65038 Details for
Bug 18880
Regression breaks local authentication fallback for all external authentications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18880: [QA Follow-up] Finishing touch
Bug-18880-QA-Follow-up-Finishing-touch.patch (text/plain), 1.80 KB, created by
Marcel de Rooy
on 2017-07-14 06:31:48 UTC
(
hide
)
Description:
Bug 18880: [QA Follow-up] Finishing touch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-07-14 06:31:48 UTC
Size:
1.80 KB
patch
obsolete
>From afa8d18f3e5614d722676ed551e058db60844bf3 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 14 Jul 2017 08:07:31 +0200 >Subject: [PATCH] Bug 18880: [QA Follow-up] Finishing touch >Content-Type: text/plain; charset=utf-8 > >Do not fill @return if retval == -1 for LDAP (see cfc484b17). >No need to call store after an DBIx update. Rearranged the if statement. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth.pm | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index e6acda9..d22e935 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1776,10 +1776,10 @@ sub checkpw { > } elsif ($ldap) { > $debug and print STDERR "## checkpw - checking LDAP\n"; > my ( $retval, $retcard, $retuserid ) = checkpw_ldap(@_); # EXTERNAL AUTH >- if ( $retval ) { >+ if ( $retval == 1 ) { > @return = ( $retval, $retcard, $retuserid ); >+ $passwd_ok = 1; > } >- $passwd_ok = 1 if $retval == 1; > $check_internal_as_fallback = 1 if $retval == 0; > > } elsif ( $cas && $query && $query->param('ticket') ) { >@@ -1824,12 +1824,12 @@ sub checkpw { > $passwd_ok = 1 if $return[0] > 0; # 1 or 2 > } > >- unless ( $passwd_ok ) { # Auth failed >- $patron->update({ login_attempts => $patron->login_attempts + 1 }) if $patron; >- } elsif ( $patron ) { >- # FIXME Koha::Object->update should return a Koha::Object to allow chaining >- $patron->update({ login_attempts => 0 }); >- $patron->store; >+ if( $patron ) { >+ if ( $passwd_ok ) { >+ $patron->update({ login_attempts => 0 }); >+ } else { >+ $patron->update({ login_attempts => $patron->login_attempts + 1 }); >+ } > } > return @return; > } >-- >2.1.4
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 18880
:
64719
|
64862
|
64877
|
64909
|
65000
|
65001
|
65011
|
65021
|
65037
|
65038
|
65053
|
65054