Bug 41978 - REST API auth/password/validation fails on patron with a null cardnumber
Summary: REST API auth/password/validation fails on patron with a null cardnumber
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: 25.05
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-03-03 14:39 UTC by Olivier Vezina
Modified: 2026-03-03 23:22 UTC (History)
2 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Vezina 2026-03-03 14:39:09 UTC
If you create a patron without a card number (null) and try to validate their credentials using auth/password/validation, the request will fail.

Error message : Expected string - got null.

The failing point isn't the validation but the return values that Koha tries to send back in Auth/Password.pm. We simply need to send: cardnumber || "", for it to work again.