[Bug 30997] New: "CGI::param called in list context" warning in detail.pl flooding error log
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 Bug ID: 30997 Summary: "CGI::param called in list context" warning in detail.pl flooding error log Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: stalkernoid@gmail.com Reporter: stalkernoid@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 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=30997 --- Comment #1 from Peter Vashchuk <stalkernoid@gmail.com> --- Created attachment 136374 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136374&action=edit Bug 30997: Fix "CGI::param called in list context" warning in detail.pl CGI param found1 should be explicitly scalar, or else error log gets flooded with this warning: CGI::param called in list context from /usr/share/koha/intranet/cgi-bin/catalogue/detail.pl line 622 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. Open any biblio (details.pl) page. 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page 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=30997 Slava Shishkin <slavashishkin@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=30997 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=30997 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136374|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 136377 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136377&action=edit Bug 30997: Fix "CGI::param called in list context" warning in detail.pl CGI param found1 should be explicitly scalar, or else error log gets flooded with this warning: CGI::param called in list context from /usr/share/koha/intranet/cgi-bin/catalogue/detail.pl line 622 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. Open any biblio (details.pl) page. 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page 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=30997 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Testing notes (using koha-testing-docker): 1. For me, the error only appeared twice in the logs for the first two records accessed. After a flush_memcached and restart_all it appears again twice. 2. Search/records used: either perl or cat, then paged through several results. 3. Also tried closing browser (set so cache is cleared and history isn't remembered), but required a restart_all for the error to start appearing in the logs again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 Jonathan Druart <jonathan.druart+koha@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=30997 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136377|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 136386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136386&action=edit Bug 30997: Fix "CGI::param called in list context" warning in detail.pl CGI param found1 should be explicitly scalar, or else error log gets flooded with this warning: CGI::param called in list context from /usr/share/koha/intranet/cgi-bin/catalogue/detail.pl line 622 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. Open any biblio (details.pl) page. 2. Check the error log and find the upper mentioned warning, check the timestamp to ensure that it was added when you loaded the page. 3. Apply the patch. 4. Load the page 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: Jonathan Druart <jonathan.druart@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=30997 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=30997 --- Comment #5 from Andrew Nugged <nugged@gmail.com> --- sidenote to David: authors of CGI.pm decided to "warn only once" that's why Plack restart helps: it starts from again "$LIST_CONTEXT_WARN == 1". from CGI.pm source in sub param: if ( wantarray && $LIST_CONTEXT_WARN == 1 ) { my ( $package, $filename, $line ) = caller; if ( $package ne 'CGI' ) { $LIST_CONTEXT_WARN++; # only warn once warn "CGI::param called in list context from $filename line $line, this can lead to vulnerabilities. " . 'See the warning in "Fetching the value or values of a single named parameter"'; } } Petro: Maybe the commit explanation might be expanded with the note "on freshly started plack because this wards suppressed later by CGI.pm" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 --- Comment #6 from David Nind <david@davidnind.com> --- (In reply to Andrew Nugged from comment #5)
sidenote to David:
authors of CGI.pm decided to "warn only once" that's why Plack restart helps: it starts from again "$LIST_CONTEXT_WARN == 1".
Thanks Andrew! That explains things. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 --- Comment #7 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=30997 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the cause of release notes| |"CGI::param called in list | |context from" warning | |messages that appear in the | |log files when viewing | |record detail pages in the | |staff interface. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00 |22.11.00, 22.05.03 released in| | CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable --- Comment #8 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30997 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|22.11.00, 22.05.03 |22.11.00, 22.05.03, released in| |21.11.11 CC| |arthur.suzuki@biblibre.com Status|Pushed to stable |Pushed to oldstable --- Comment #9 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=30997 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED --- Comment #10 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.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org