[Koha-bugs] [Bug 35204] REST API: POST endpoint /auth/password/validation dies on patron with expired password
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Dec 18 12:01:10 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35204
Matt Blenkinsop <matt.blenkinsop at ptfs-europe.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #159612|0 |1
is obsolete| |
--- Comment #8 from Matt Blenkinsop <matt.blenkinsop at ptfs-europe.com> ---
Created attachment 159939
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159939&action=edit
Bug 35204: Prevent an expired password from throwing a 500 error
Currently when a patron with an expired password is authenticated via the API a
500 error is returned rather than a 400 "Validation failed" error. This patch
catches the return value for an expired password and returns the validation
failure before the patron search is attempted.
Test plan:
1) Choose a patron and set their password expiry date to a date in the past
2) Send a request to auth/password/validation as an authenticated user with
that patron's details
3) The response should be a 500 error
4) Apply patch
5) Repeat steps 1-3 and this time the response should be a 400 code with an
error message of "Password expired"
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list