Bugzilla – Attachment 54664 Details for
Bug 16886
'Upload patron images' tool is not plack safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 16886: Make the 'Upload patron images' tool plack safe
PASSED-QA-Bug-16886-Make-the-Upload-patron-images-.patch (text/plain), 2.00 KB, created by
Katrin Fischer
on 2016-08-21 19:18:30 UTC
(
hide
)
Description:
[PASSED QA] Bug 16886: Make the 'Upload patron images' tool plack safe
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-08-21 19:18:30 UTC
Size:
2.00 KB
patch
obsolete
>From 865045deabf22c85be2c120d5d5fcc329d763542 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 9 Jul 2016 13:13:35 +0100 >Subject: [PATCH] [PASSED QA] Bug 16886: Make the 'Upload patron images' tool > plack safe > >Some vars are accessed from subroutine, but defined with my. >It causes at least the 2 followings errors: >Variable "$filetype" is not available at >/home/koha/src/tools/picture-upload.pl line 240. >Variable "$uploadfilename" is not available at >/home/koha/src/tools/picture-upload.pl line 241. > >To avoid that, they are now declared with our. > >Test plan: >Upload image for a patron and confirm that you get a "Result" table and >the errors do not longer appear in the logs. > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > tools/picture-upload.pl | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl >index 7091b58..9892eb5 100755 >--- a/tools/picture-upload.pl >+++ b/tools/picture-upload.pl >@@ -46,9 +46,9 @@ my ($template, $loggedinuser, $cookie) > debug => 0, > }); > >-my $filetype = $input->param('filetype'); >+our $filetype = $input->param('filetype') || ''; > my $cardnumber = $input->param('cardnumber'); >-my $uploadfilename = $input->param('uploadfile'); >+our $uploadfilename = $input->param('uploadfile') || ''; > my $uploadfile = $input->upload('uploadfile'); > my $borrowernumber = $input->param('borrowernumber'); > my $op = $input->param('op') || ''; >@@ -76,7 +76,9 @@ Files greater than 100K will be refused. Images should be 140x200 pixels. If the > > $debug and warn "Operation requested: $op"; > >-my ( $total, $handled, @counts, $tempfile, $tfh, %errors ); >+my ( $total, $handled, $tempfile, $tfh ); >+our @counts = (); >+our %errors = (); > > # Case is important in these operational values as the template must use case to be visually pleasing! > if ( ( $op eq 'Upload' ) && $uploadfile ) { >-- >2.7.4
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 16886
:
53234
|
53264
| 54664