Koha-clms/C4/SIP/Sip
Martin Renvoize 6dfe5f4415
Bug 42847: (QA follow-up) Clear session state on all login_core exit paths
login_core only cleared leftover session state on the failed-auth
branch. The earlier 'SIP access not authorized' return (unknown
terminal id) left any account/ils/institution/policy/credentials from
a prior connection on a reused prefork worker in place.

Move the reset to the top of login_core so every non-success exit path
leaves clean state, and only a successful api_auth re-establishes the
session. This keeps the no-authenticated-state-until-auth invariant in
a single place rather than duplicating the key list per branch.

Also extend the unit test to cover the unknown-terminal path on a
reused worker.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c375a5cd34e88b0a1d2d0109a523199ef9a6dc06)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-08-10 08:18:07 -06:00
..
Checksum.pm Bug 40680: Move EXPORT_OK right after Modern::Perl 2025-12-01 08:33:56 -07:00
Configuration.pm Bug 42664: Reload SIP2 configuration in every worker process 2026-07-13 16:10:33 -06:00
Constants.pm Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
MsgType.pm Bug 42847: (QA follow-up) Clear session state on all login_core exit paths 2026-08-10 08:18:07 -06:00