Bugzilla – Attachment 64877 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
0001-PATCH-Bug-18880-Regression-breaks-local-authenticati.patch (text/plain), 1.91 KB, created by
Oliver Behnke
on 2017-07-07 07:05:46 UTC
(
hide
)
Description:
Bug 18880: Regression breaks local authentication fallback for all external authentications
Filename:
MIME Type:
Creator:
Oliver Behnke
Created:
2017-07-07 07:05:46 UTC
Size:
1.91 KB
patch
obsolete
>From 97bf74fd0e12d37c5e27571a70f4dd06f801ded6 Mon Sep 17 00:00:00 2001 >From: Oliver Bock <oliver.bock@aei.mpg.de> >Date: Fri, 7 Jul 2017 08:56:25 +0200 >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 regression itself is a logical error as "@return = (0)" is >considered to be "false" when checked with "unless" (line 1814). That's >wrong as "unless" tests the number of elements in a list. Thus the >"falsy" condition has to established with "@return = ()" instead. >--- > lib/C4/Auth.pm | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/lib/C4/Auth.pm b/lib/C4/Auth.pm >index 9e787c0..e355d3b 100644 >--- a/lib/C4/Auth.pm >+++ b/lib/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