Bug 19258 - Fix warns when paying or writing off a fine or charge
Summary: Fix warns when paying or writing off a fine or charge
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Aleisha Amohia
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-05 22:05 UTC by Aleisha Amohia
Modified: 2019-10-14 19:56 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19258: Prevent warn when paying a fine or charge from Pay Amount button (1.11 KB, patch)
2017-09-05 22:10 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19258: Prevent warns when writing off an individual fine (2.22 KB, patch)
2017-09-05 22:36 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19258: Preventing warns when paying a fine or charge from Pay selected button (2.05 KB, patch)
2017-09-05 22:40 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19258: Prevent warn when reversing a payment (1.33 KB, patch)
2017-09-05 22:44 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19258: Prevent warn when paying a fine or charge (1.43 KB, patch)
2017-09-06 04:29 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 19258: Prevent warns when writing off an individual fine (2.27 KB, patch)
2017-09-06 04:29 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 19258: Preventing warns when paying a fine or charge from Pay selected button (2.10 KB, patch)
2017-09-06 04:29 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 19258: Prevent warn when reversing a payment (1.38 KB, patch)
2017-09-06 04:29 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 19258: Prevent warn when paying a fine or charge (1.51 KB, patch)
2017-09-07 17:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19258: Prevent warns when writing off an individual fine (2.35 KB, patch)
2017-09-07 17:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19258: Preventing warns when paying a fine or charge from Pay selected button (2.18 KB, patch)
2017-09-07 17:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19258: Prevent warn when reversing a payment (1.46 KB, patch)
2017-09-07 17:41 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2017-09-05 22:05:30 UTC
CGI::param called in list context from package CGI::Compile::ROOT::home_vagrant_kohaclone_members_paycollect_2epl line 72, this can lead to vulnerabilities. See the warning in "Fetching the value or values of a single named parameter" at /usr/share/perl5/CGI.pm line 436.
Comment 1 Aleisha Amohia 2017-09-05 22:10:00 UTC
Created attachment 66859 [details] [review]
Bug 19258: Prevent warn when paying a fine or charge from Pay Amount button

To test:
1) Go to a members detail page in staff side and create a manual invoice
2) Go to the pay fines tab, select any fines and click Pay amount
3) Notice warn
4) Apply patch and repeat steps 1 & 2
5) Warn should be gone

Sponsored-by: Catalyst IT
Comment 2 Aleisha Amohia 2017-09-05 22:36:31 UTC
Created attachment 66860 [details] [review]
Bug 19258: Prevent warns when writing off an individual fine

The following warns are triggered when I click the Write Off button next
to an individual fine or charge:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line 171,
this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at
/usr/share/perl5/CGI.pm line 436. (this shows many times)
Use of uninitialized value in subroutine entry at
/usr/share/perl5/URI/Escape.pm line 184.

To test:
1) Go to a members detail page in staff side and create a manual
invoice
2) Go to the pay fines tab, click the Write off button next to the
invoice you just created
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT
Comment 3 Aleisha Amohia 2017-09-05 22:40:23 UTC
Created attachment 66861 [details] [review]
Bug 19258: Preventing warns when paying a fine or charge from Pay selected button

The following warns are triggered when I click the Pay selected button:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line 267,
this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at
usr/share/perl5/CGI.pm line 436.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line
273, this can lead to vulnerabilities. See the warning in "Fetching
the value or values of a single named parameter" at
/usr/share/perl5/CGI.pm line 436.

To test:
1) Go to a members detail page in staff side and create a manual
invoice
2) Go to the pay fines tab, select the fine you just created and click
Pay selected
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT
Comment 4 Aleisha Amohia 2017-09-05 22:44:41 UTC
Created attachment 66862 [details] [review]
Bug 19258: Prevent warn when reversing a payment

The following warn is triggered when I click the Reverse button next to
an individual payment on the Account tab:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_boraccount_2epl line
63, this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at /usr/share/perl5/CGI.pm
line 436.

To test:
1) Go to a members detail page in staff side, create a manual invoice,
pay it
2) Go to the Account tab, click Reverse next to the payment you just
made
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT
Comment 5 Aleisha Amohia 2017-09-05 22:46:17 UTC
This is ready for testing and tests 4 different areas in the fines section of the member's page. Test each patch one after the other following each test plan. Will be quick testing!
Comment 6 Mark Tompsett 2017-09-06 04:29:04 UTC
Created attachment 66864 [details] [review]
Bug 19258: Prevent warn when paying a fine or charge

To test:
 1) Go to a members detail page in staff client
 2) Select the Fines tab in the left pane
 3) Select the Create manual invoice tab below the button menu bar
 4) Create a fine and click save (e.g. Type: Fine, Amount: 5.00)
 5) Select the Pay fines tab below the button menu bar
 6) Click Pay on the item
 7) Blank the staff error log
 8) click confirm
    -- staff error log has message
 9) apply this first patch
10) repeat steps 3-8
    -- staff error log is blank
11) run koha qa test tools

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 7 Mark Tompsett 2017-09-06 04:29:14 UTC
Created attachment 66865 [details] [review]
Bug 19258: Prevent warns when writing off an individual fine

The following warns are triggered when I click the Write Off button next
to an individual fine or charge:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line 171,
this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at
/usr/share/perl5/CGI.pm line 436. (this shows many times)
Use of uninitialized value in subroutine entry at
/usr/share/perl5/URI/Escape.pm line 184.

To test:
1) Go to a members detail page in staff side and create a manual
invoice
2) Go to the pay fines tab, click the Write off button next to the
invoice you just created
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 8 Mark Tompsett 2017-09-06 04:29:23 UTC
Created attachment 66866 [details] [review]
Bug 19258: Preventing warns when paying a fine or charge from Pay selected button

The following warns are triggered when I click the Pay selected button:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line 267,
this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at
usr/share/perl5/CGI.pm line 436.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line
273, this can lead to vulnerabilities. See the warning in "Fetching
the value or values of a single named parameter" at
/usr/share/perl5/CGI.pm line 436.

To test:
1) Go to a members detail page in staff side and create a manual
invoice
2) Go to the pay fines tab, select the fine you just created and click
Pay selected
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 9 Mark Tompsett 2017-09-06 04:29:29 UTC
Created attachment 66867 [details] [review]
Bug 19258: Prevent warn when reversing a payment

The following warn is triggered when I click the Reverse button next to
an individual payment on the Account tab:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_boraccount_2epl line
63, this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at /usr/share/perl5/CGI.pm
line 436.

To test:
1) Go to a members detail page in staff side, create a manual invoice,
pay it
2) Go to the Account tab, click Reverse next to the payment you just
made
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Comment 10 Jonathan Druart 2017-09-07 17:41:03 UTC
Created attachment 66958 [details] [review]
Bug 19258: Prevent warn when paying a fine or charge

To test:
 1) Go to a members detail page in staff client
 2) Select the Fines tab in the left pane
 3) Select the Create manual invoice tab below the button menu bar
 4) Create a fine and click save (e.g. Type: Fine, Amount: 5.00)
 5) Select the Pay fines tab below the button menu bar
 6) Click Pay on the item
 7) Blank the staff error log
 8) click confirm
    -- staff error log has message
 9) apply this first patch
10) repeat steps 3-8
    -- staff error log is blank
11) run koha qa test tools

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2017-09-07 17:41:07 UTC
Created attachment 66959 [details] [review]
Bug 19258: Prevent warns when writing off an individual fine

The following warns are triggered when I click the Write Off button next
to an individual fine or charge:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line 171,
this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at
/usr/share/perl5/CGI.pm line 436. (this shows many times)
Use of uninitialized value in subroutine entry at
/usr/share/perl5/URI/Escape.pm line 184.

To test:
1) Go to a members detail page in staff side and create a manual
invoice
2) Go to the pay fines tab, click the Write off button next to the
invoice you just created
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Jonathan Druart 2017-09-07 17:41:11 UTC
Created attachment 66960 [details] [review]
Bug 19258: Preventing warns when paying a fine or charge from Pay selected button

The following warns are triggered when I click the Pay selected button:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line 267,
this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at
usr/share/perl5/CGI.pm line 436.
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_pay_2epl line
273, this can lead to vulnerabilities. See the warning in "Fetching
the value or values of a single named parameter" at
/usr/share/perl5/CGI.pm line 436.

To test:
1) Go to a members detail page in staff side and create a manual
invoice
2) Go to the pay fines tab, select the fine you just created and click
Pay selected
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 13 Jonathan Druart 2017-09-07 17:41:15 UTC
Created attachment 66961 [details] [review]
Bug 19258: Prevent warn when reversing a payment

The following warn is triggered when I click the Reverse button next to
an individual payment on the Account tab:
CGI::param called in list context from package
CGI::Compile::ROOT::home_vagrant_kohaclone_members_boraccount_2epl line
63, this can lead to vulnerabilities. See the warning in "Fetching the
value or values of a single named parameter" at /usr/share/perl5/CGI.pm
line 436.

To test:
1) Go to a members detail page in staff side, create a manual invoice,
pay it
2) Go to the Account tab, click Reverse next to the payment you just
made
3) Notice warns
4) Apply patch and repeat steps 1 & 2
5) Warns should be gone

Sponsored-by: Catalyst IT

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 14 Jonathan Druart 2017-09-07 18:08:45 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 15 Fridolin Somers 2017-10-10 10:02:30 UTC
Pushed to 17.05.x, will be in 17.05.05.

Reducing log files saves trees ;)
Comment 16 Katrin Fischer 2017-10-14 12:05:36 UTC
Doesn't apply cleanly to 16.11.x - please provide rebased patches if you want this to be included.