Koha/acqui
Petro Vashchuk 096fd4acfa
Bug 31001: Fix "CGI::param called in list context" warning in basket.pl
CGI param basketno should be explicitly scalar,
or else error log gets flooded with this warning:

AH01215: CGI::param called in list context from
/home/vagrant/kohaclone/acqui/basket.pl line 175, 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 412.

This patch fixes it by working with it in a scalar context.
The functionality still remains the same but warning doesn't flood
error log.

To reproduce:
1. Head over to the acquisitions page.
2. Pick existing vendor with email contact info or create a new one.
3. Create a new basket or use existing one, and if it doesn't have
any orders, add a new order to it.
4. Use the "E-mail order" button to send order.
5. Check the error log and find the upper mentioned warning.
(Note: if you're going to test this more than once, you might need
to restart your Plack in order for this warning to get added to your
log file again, reasons of that is that the authors of CGI.pm decided
to "warn only once")
6. Apply the patch.
7. Use the "E-mail order" button again, ensure that the same warning
doesn't get added to the log file again.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-06 18:29:32 -03:00
..
acqui-home.pl
addorder.pl
addorderiso2709.pl Bug 29607: Store the discount amount correctly when importing and order from a file 2022-06-06 14:28:51 -03:00
ajax-getauthvaluedropbox.pl
basket.pl Bug 31001: Fix "CGI::param called in list context" warning in basket.pl 2022-07-06 18:29:32 -03:00
basketgroup.pl
basketheader.pl
booksellers.pl
cancelorder.pl
check_budget_total.pl
check_uniqueness.pl
duplicate_orders.pl
edi_ean.pl
edifactmsgs.pl
edimsg.pl
finishreceive.pl
histsearch.pl
invoice-files.pl
invoice.pl
invoices.pl
lateorders-export.pl
lateorders.pl
modordernotes.pl
neworderempty.pl
newordersubscription.pl
newordersuggestion.pl Bug 23991: Move SearchSuggestion to Koha::Suggestions 2022-06-27 12:30:28 -03:00
ordered.pl
orderreceive.pl
parcel.pl
parcels.pl
showorder.pl
spent.pl
supplier.pl
transferorder.pl
uncertainprice.pl
updatesupplier.pl
z3950_search.pl