Koha-clms/Koha/Patron
Jake Deery ca8c626fdf
Bug 41818: Add new Koha::Patron::Message method to SIP2
This bug adds Koha::Patron::Message::message_without_newlines, which has been added to C4::SIP::ILS::Patron in lieu of Koha::Patron::Message::message. The aim of this change is to prevent SIP2 units from crashing out when they encounter a patron message with newlines (\n or \r) in it, as units generally use a newline character to denote the end of a SIP2 transaction.

To test:
a)  go to /cgi-bin/koha/sip2/institutions
    *)  create an institution, name CPL, timeout 300, the rest default
b)  go to /cgi-bin/koha/sip2/accounts
    *)  create an account, userid koha, institution CPL, terminator crlf, the rest default
c)  go to /cgi-bin/koha/members/moremember.pl?borrowernumber=51
    *)  click add message in toolbar
    *)  enter some multi-line message e.g. test[RETURN]1[RETURN]2[RETURN]3[RETURN][RETURN][RETURN]
d)  run tail -f /var/log/koha/kohadev/sip-output.log, keep this window open
e)  run ./misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l CPL --patron 42 -m patron_information
f)  look at the tail log, notice how the MSG 64 line has a newline before the final pipe (|) character
== APPLY PATCH ==
g)  restart_all
h)  repeat steps e-f
i)  notice how in the tail log, the MSG 64 line now has the final pipe character contiguously placed with the successive characters
== SIGN OFF ==

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ab88c85f3b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-04-13 08:45:23 +01:00
..
Attribute Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
MessagePreference Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Password Bug 40680: Move EXPORT_OK right after Modern::Perl 2025-12-01 08:33:56 -07:00
Restriction Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Attribute.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Attributes.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Categories.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Category.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Consent.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Consents.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Debarments.pm Bug 40680: Move EXPORT_OK right after Modern::Perl 2025-12-01 08:33:56 -07:00
Discharge.pm Bug 40458: add pod coverage to Discharge.pm 2025-07-21 14:01:34 -06:00
Files.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
HouseboundProfile.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
HouseboundProfiles.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
HouseboundRole.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
HouseboundRoles.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
HouseboundVisit.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
HouseboundVisits.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Image.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Images.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Message.pm Bug 41818: Add new Koha::Patron::Message method to SIP2 2026-04-13 08:45:23 +01:00
MessagePreference.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
MessagePreferences.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Messages.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Modification.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Modifications.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Relationship.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Relationships.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Restriction.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
Restrictions.pm Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00