https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36928

--- Comment #1 from Kyle M Hall <[email protected]> ---
Created attachment 167047
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167047&action=edit
Bug 36928: Patron authentication / password validation will fail with 500 error
for local users if LDAP is enabled

If LDAP is enabled, and use of /api/v1/auth/password/validation will fail with
a 500 internal server error like:
Can't call method "cardnumber" on an undefined value at
/usr/share/koha/lib/Koha/REST/V1/Auth/Password.pm line 83, <DATA> line 1490.

This is because the valid patron object is being overwritten with an undefined
value if there is no LDAP patron returned. Since a failed LDAP query falls back
to local user auth, we try to use the now undefined patron object thus
generating an error.

Test Plan:
1) Set up and enable LDAP
2) POST JSON to /api/v1/auth/password/validation like:
{
    "userid": "koha",
    "password": "koha"
}
3) Note the 500 erorr
4) Apply this patch
5) Restart all the things!
6) POST the data again
7) It works!

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to