Koha-clms/opac/svc
Marcel de Rooy 8835e542c2 Bug 21115: Add multi_param call and add divider in cache key in svc/report and opac counterpart
Resolve things like:
CGI::param called in list context from package CGI::Compile::ROOT::usr_share_koha_prodclone_opac_svc_report line 42, 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.

The cache key in both script looks like:
    opac:report:id:602018
but should for consistency be:
    opac:report:id:60:2018
Note: The 2018 here is part of the sql_params and should not be
concatenated to the report id.

Test plan:
Do not yet apply this patch.
Make a report public, set cache to 300 secs.
Check its output with opac/svc/report.
Check for the warn in your log.
Apply the patch, restart Plack and flush cache.
Check opac/svc/report.
Modify your report; e.g. add a simple string to the SELECT.
Check opac/svc/report. You should still see cached output.
Flush the cache.
Check opac/svc/report. You should now see the added text.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested also by clearing individual keys with $cache->clear_from_cache.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit bfbbe52ff7)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 2ea99b1998)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2018-11-09 09:33:39 +01:00
..
auth Bug 18118: Unexpected behaviour with 'GoogleOpenIDConnect' and 'OpacPublic' syspref combination. 2017-10-27 14:09:02 -03:00
club Bug 12461 - Add patron clubs feature 2017-04-28 08:37:44 -04:00
patron Bug 9303 [QA Followup] - Restore missing svc script 2015-12-31 13:09:49 +00:00
checkout_notes Bug 18915: Renaming svc/patron_notes to svc/checkout_notes 2018-01-23 01:26:28 +00:00
overdrive bug_16034 Add overdrive info to the users page in the public interface 2017-02-21 19:58:21 +00:00
overdrive_proxy Bug 17392 - opac/svc/overdrive_proxy is not plack safe 2016-10-11 16:16:02 +00:00
report Bug 21115: Add multi_param call and add divider in cache key in svc/report and opac counterpart 2018-11-09 09:33:39 +01:00
shelfbrowser.pl Bug 7976: Remove the borrow permission 2015-06-05 13:43:34 -03:00
suggestion Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00