Bugzilla – Attachment 185583 Details for
Bug 40675
Carriage return in patron note message breaks SIP
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40675
Bug-40675.patch (text/plain), 1.38 KB, created by
Bernard
on 2025-08-20 10:56:44 UTC
(
hide
)
Description:
Bug 40675
Filename:
MIME Type:
Creator:
Bernard
Created:
2025-08-20 10:56:44 UTC
Size:
1.38 KB
patch
obsolete
>From 6fb1a745024d7205fdbafa9bf2ea1bab8236fda8 Mon Sep 17 00:00:00 2001 >From: Bernard Scaife <bernard.scaife@openfifth.co.uk> >Date: Wed, 20 Aug 2025 10:53:38 +0000 >Subject: [PATCH] Bug 40675 > >Removes carriage returns from messages to prevent breaking SIP > >Test >1. Find a user and click "Add message". >2. Choose "Add message for OPAC ... " from dropdown >3. In Word (or similar, type a message adding a carriage return in the middle of it. >4. Copy / paste this text into the message box and save. >5. Run the SIP emulator tool sip_cli_emulator.pl and observe that after the carriage return, the message has broken onto a new line. >6. Install patch >7. restart_all >8. Repeat above 1-5 >9. Observe that runaway line is now joined to the previous line (correctly) >--- > C4/SIP/Sip.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/SIP/Sip.pm b/C4/SIP/Sip.pm >index c4cff7ee94..0edef706e7 100644 >--- a/C4/SIP/Sip.pm >+++ b/C4/SIP/Sip.pm >@@ -97,8 +97,8 @@ sub add_field { > ); > $value = ''; > } >- $value =~ s/\r/ /g; # CR terminates a sip message >- # Protect against them in sip text fields >+ $value =~ s/\r\n/ /g; # CR terminates a sip message >+ # Protect against them in sip text fields > > # Replace any occurrences of the field delimiter in the > # field value with the HTML character entity >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40675
: 185583