[Bug 31001] New: "CGI::param called in list context" warning in basket.pl flooding error log
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Bug ID: 31001 Summary: "CGI::param called in list context" warning in basket.pl flooding error log Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Acquisitions Assignee: stalkernoid@gmail.com Reporter: stalkernoid@gmail.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 --- Comment #1 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 136395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136395&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Peter Vashchuk <stalkernoid@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25790 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25790 [Bug 25790] [OMNIBUS] warnings removal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136395|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 136558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136558&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This fixes the cause of a release notes| |warning message that | |appears in the system logs | |when emailing an order to a | |vendor (Acquisitions > | |[select a vendor] > [select | |a basket] > E-mal order). | |The warning message was | |"[WARN] CGI::param called | |in list context from | |/kohadevbox/koha/acqui/bask | |et.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 414.". --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using koha-testing-docker): - The warning message appears in this log file: /var/log/koha/kohadev/plack-intranet-error.log - Note: Lots of other messages will be included in the log if email is not configured. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136558|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 137249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137249&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.04 released in| | Status|Pushed to master |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable Version(s)|22.11.00, 22.05.04 |22.11.00, 22.05.04, released in| |21.11.11 --- Comment #7 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- pushed to 21.11.x for 21.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document, marking resolved. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31001 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Acquisitions |Architecture, internals, | |and plumbing -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org