Bugzilla – Attachment 185802 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: Added new regex to prevent regression
Bug-40675-Added-new-regex-to-prevent-regression.patch (text/plain), 1.28 KB, created by
Bernard
on 2025-08-26 16:08:07 UTC
(
hide
)
Description:
Bug 40675: Added new regex to prevent regression
Filename:
MIME Type:
Creator:
Bernard
Created:
2025-08-26 16:08:07 UTC
Size:
1.28 KB
patch
obsolete
>From 0585853320d6ded0edb78f9d8dbbe301f1dbe3bf Mon Sep 17 00:00:00 2001 >From: Bernard Scaife <bernard.scaife@openfifth.co.uk> >Date: Tue, 26 Aug 2025 16:06:11 +0000 >Subject: [PATCH] Bug 40675: Added new regex to prevent regression > >I am told my original patch could cause a regression and should instead be >$value =~ s/\r\n|\r|\n/ /g; > >"We probably really want to normalise all options to a space as opposed to switching options. My original change switches us from Mac CR characters to Windows combination of CRLF (and unit tends to just stick to LF in the olden days).. so to really fix the bug we should look for all three as above." >--- > 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 0edef706e7..f48a36e97e 100644 >--- a/C4/SIP/Sip.pm >+++ b/C4/SIP/Sip.pm >@@ -97,8 +97,8 @@ sub add_field { > ); > $value = ''; > } >- $value =~ s/\r\n/ /g; # CR terminates a sip message >- # Protect against them in sip text fields >+ $value =~ s/\r\n|\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
|
185791
|
185792
|
185793
|
185794
|
185802
|
185833
|
186456
|
186457
|
186608
|
186609
|
186610