Bug 41978

Summary: REST API auth/password/validation fails on patron with a null cardnumber
Product: Koha Reporter: Olivier Vezina <ovezina>
Component: REST APIAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dcook, tomascohen
Version: 25.05   
Hardware: All   
OS: All   
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:

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.