Bugzilla – Attachment 81262 Details for
Bug 21605
Cannot create EDI account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to validate the input to the boolean functionality fields
0001-Bug-21605-Ensure-EDI-acct-fields-set-to-boolean-val.patch (text/plain), 1.84 KB, created by
Colin Campbell
on 2018-10-26 09:51:33 UTC
(
hide
)
Description:
patch to validate the input to the boolean functionality fields
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2018-10-26 09:51:33 UTC
Size:
1.84 KB
patch
obsolete
>From 747d01631080c18d85685ed41a00b86117a63aba 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 >--- > 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.17.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