Bug 36676: SIP2 drops connection on unknown patron id in fee paid message
authorJan Kissig <jkissig@th-wildau.de>
Tue, 23 Apr 2024 18:19:05 +0000 (20:19 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 10 May 2024 13:19:00 +0000 (15:19 +0200)
commitd59e148879c0495f5071998d4521875e9c9022ed
tree71d4d7d8065c811d2dac708b8f5d998070ce2efd
parent9628e6a5298b45ceab7d9d443ba1c006b4df9313
Bug 36676: SIP2 drops connection on unknown patron id in fee paid message

When sending a fee paid message to SIP2 with an unknown patron id it will respond with an empty response followed by dropping the connection to a client.

Test plan:
a) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423    124447FT00USDBV0.01|AO|AA2352900100046|ACterm1|
Use of uninitialized value $data in concatenation (.) or string at /usr/share/koha/bin/sip_cli_emulator.pl line 355, <GEN0> chunk 1.
READ:

b) apply patch
c) perl /usr/share/koha/bin/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1   -l CPL --patron 2352900100046 -m fee_paid --fee-type FT --fee-amount 0.01
Output:
Trying 'fee_paid'
SEND: 3720240423    125602FT00USDBV0.01|AO|AA2352900100046|ACterm1|
READ: 38N20240423    125602AO|AA2352900100046|AFInvalid patron barcode.|

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
C4/SIP/ILS.pm