[Koha-bugs] [Bug 18880] Regression breaks local authentication fallback for all external authentications
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Jul 11 16:10:07 CEST 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18880
Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|BLOCKED |Failed QA
--- Comment #16 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Just reading commit cfc484b17 and this patch, I think that we do not completely
recover the regression described.
Formerly, a return 0; was issued in a number of cases. Now this patch assigns
@return=() instead of (0). Both approaches are not bug free.
Although we already know that we should return false, we are going to call
checkpw_internal now since @return is empty! We should not.
After calling checkpw_internal, @return is changed and the actual results may
vary.
The problem of the regression is in the older commit is here:
return ( $retval, $retcard, $retuserid ) is not necessarily the same as return
@return
If we evaluate in scalar context, return @return will return the number of list
elements while return (...) returns the last element (here retuserid). Welcome
to Perl :)
Evaluation in list context will be the same.
So when @return was (0), return @return did not return a 0 but did return a 1
in scalar context !!
Apparently, the external authentifications broken called this routine in scalar
context. I would say that we also (at least theoretically) need to address
these calls since they probably relied on $retuserid instead of $retval ! Which
in practice might not be a problem btw..
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list