Bugzilla – Attachment 119637 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.58 KB, created by
Owen Leonard
on 2021-04-15 15:14:27 UTC
(
hide
)
Description:
Bug 26989: Safeguard Order Messages from unwanted characters
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2021-04-15 15:14:27 UTC
Size:
1.58 KB
patch
obsolete
>From d3b3693cdcb818bb5fbc9c386afcd823dcf19901 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. >--- > 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.11.0
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