Bugzilla – Attachment 83700 Details for
Bug 21605
Cannot create EDI account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21605: Ensure EDI acct fields set to boolean val
Bug-21605-Ensure-EDI-acct-fields-set-to-boolean-va.patch (text/plain), 1.96 KB, created by
Martin Renvoize (ashimema)
on 2019-01-07 18:11:41 UTC
(
hide
)
Description:
Bug 21605: Ensure EDI acct fields set to boolean val
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-01-07 18:11:41 UTC
Size:
1.96 KB
patch
obsolete
>From 7ec83c09a4996ae5a63c604924564b596f037182 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Fri, 26 Oct 2018 10:42:13 +0100 >Subject: [PATCH] Bug 21605: Ensure EDI acct fields set to boolean val > >Validate the input to the fields indicating account >functionality. The only valid values are 1 and 0 >non-integer (or integers other than 0/1) are invalid > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > admin/edi_accounts.pl | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > >diff --git a/admin/edi_accounts.pl b/admin/edi_accounts.pl >index e6f8676ee6..3eccb5320b 100755 >--- a/admin/edi_accounts.pl >+++ b/admin/edi_accounts.pl >@@ -81,14 +81,17 @@ else { > download_directory => scalar $input->param('download_directory'), > san => scalar $input->param('san'), > transport => scalar $input->param('transport'), >- quotes_enabled => defined $input->param('quotes_enabled'), >- invoices_enabled => defined $input->param('invoices_enabled'), >- orders_enabled => defined $input->param('orders_enabled'), >- responses_enabled => defined $input->param('responses_enabled'), >- auto_orders => defined $input->param('auto_orders'), > id_code_qualifier => scalar $input->param('id_code_qualifier'), > plugin => scalar $input->param('plugin'), > }; >+ # ensure all capability fields set to binary 0 or 1 >+ foreach my $capability >+ (qw( quotes_enabled invoices_enabled orders_enabled responses_enabled auto_orders)) { >+ $fields->{$capability} = defined $input->param($capability); >+ if ($fields->{$capability} != 1) { >+ $fields->{$capability} = 0; >+ } >+ } > > if ($id) { > $schema->resultset('VendorEdiAccount')->search( >-- >2.19.2
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 21605
:
81262
|
83167
|
83168
| 83700 |
83701