Bugzilla – Attachment 64862 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: Regression breaks local authentication fallback for all external authentications
Bug-18880-Regression-breaks-local-authentication-f.patch (text/plain), 2.20 KB, created by
Mark Tompsett
on 2017-07-06 18:39:42 UTC
(
hide
)
Description:
Bug 18880: Regression breaks local authentication fallback for all external authentications
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-07-06 18:39:42 UTC
Size:
2.20 KB
patch
obsolete
>From 259e186b5acd4903249e96e0ceb997becbc9d4e9 Mon Sep 17 00:00:00 2001 >From: Oliver Bock <oliver.bock@aei.mpg.de> >Date: Thu, 6 Jul 2017 18:37:42 +0000 >Subject: [PATCH] Bug 18880: Regression breaks local authentication fallback > for all external authentications > >A regression in commit cfc484b17 / bug #18314 breaks the local >authentication fallback for all external authentications like LDAP, CAS >and Shibboleth. The severity is critical for us as we, while using LDAP >authentication, use the self-service checkout which requires a local >user account. Also non-LDAP staff can't log into the staff pages >anymore. > >The regression itself is a logical error as "@return = (0)" is >considered to be "false" when checked with "unless". That's wrong as >"unless" tests the number of elements in a list. Thus the "falsy" >condition has to established with "@return = ()" instead. > >Please find attached a proposed patch against "17.05.x". Also, please >make sure the fallback workflow gets test coverage. >--- > C4/Auth.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index e7b0895160..2e014c2237 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1764,14 +1764,14 @@ sub checkpw { > my $patron = Koha::Patrons->find({ userid => $userid }); > > if ( $patron and $patron->account_locked ) { >- @return = (0); >+ @return = (); > } elsif ($ldap) { > $debug and print STDERR "## checkpw - checking LDAP\n"; > my ( $retval, $retcard, $retuserid ) = checkpw_ldap(@_); # EXTERNAL AUTH > if ( $retval ) { > @return = ( $retval, $retcard, $retuserid ); > } else { >- @return = (0); >+ @return = (); > } > > } elsif ( $cas && $query && $query->param('ticket') ) { >@@ -1784,7 +1784,7 @@ sub checkpw { > if ( $retval ) { > @return = ( $retval, $retcard, $retuserid ); > } else { >- @return = (0); >+ @return = (); > } > } > >@@ -1805,7 +1805,7 @@ sub checkpw { > if ( $retval ) { > @return = ( $retval, $retcard, $retuserid ); > } else { >- @return = (0); >+ @return = (); > } > } > } >-- >2.11.0
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