Bugzilla – Attachment 119765 Details for
Bug 26989
Ensure no CR occurs in an EDIFACT order message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26989: Safeguard Order Messages from unwanted characters
Bug-26989-Safeguard-Order-Messages-from-unwanted-c.patch (text/plain), 1.65 KB, created by
Kyle M Hall (khall)
on 2021-04-16 16:31:05 UTC
(
hide
)
Description:
Bug 26989: Safeguard Order Messages from unwanted characters
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-04-16 16:31:05 UTC
Size:
1.65 KB
patch
obsolete
>From 8e1e7f7fbcf63b6e5d95f9cca4c86ba5cefcf40f Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Tue, 10 Nov 2020 14:30:15 +0000 >Subject: [PATCH] Bug 26989: Safeguard Order Messages from unwanted characters > >Carriage returns in notes were causing a supplier's parser >to truncate Order messages received from Koha. >Have removed those and also made a global removal of CR, Line feeds >and tabs - the latter two having the possibility of causing >errors in the future > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >There was no test plan to follow, but the patch appears to be making >sensible changes. If someone wants to provide a thorough test plan I can >re-test. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/Edifact/Order.pm | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/Koha/Edifact/Order.pm b/Koha/Edifact/Order.pm >index b5434872ae..fa356b0928 100644 >--- a/Koha/Edifact/Order.pm >+++ b/Koha/Edifact/Order.pm >@@ -104,6 +104,10 @@ sub encode { > $self->{transmission} .= $self->user_data_message_segments(); > > $self->{transmission} .= $self->trailing_service_segments(); >+ >+ # Guard against CR LF etc being added in data from DB >+ $self->{transmission}=~s/[\r\n\t]//g; >+ > return $self->{transmission}; > } > >@@ -406,7 +410,9 @@ sub order_line { > my $ol_fields = { budget_code => $budget->{budget_code}, }; > if ( $orderline->order_vendornote ) { > $ol_fields->{servicing_instruction} = $orderline->order_vendornote; >+ chomp $ol_fields->{servicing_instruction}; > } >+ > my $item_fields = []; > for my $item (@items) { > push @{$item_fields}, >-- >2.24.3 (Apple Git-128)
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 26989
:
113414
|
119637
| 119765