[Bug 17392] New: opac/svc/overdrive_proxy is not plack safe
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Bug ID: 17392 Summary: opac/svc/overdrive_proxy is not plack safe Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org When running under plack the parameters in the url passed to overdrive are separated by semi-colons as opposed to ampersands example, dumping $query->query_string from /opac/svc/overdrive_proxy under plack we have: 'q=howard%20wigglebottom;limit=1;offset=0' If the page is excluded from plack we get: 'q=howard%20wigglebottom&limit=1&offset=0' You can test in a rest client, the first will return spurious results, searches in opac will report one number of hits, clicking the link for results will return none or a different number of hits from overdrive Tried removing the qw(-oldstyle-urls) from the script but it had no effect, though without that when excluded from plack things also don't work This is verified under master and 3.22 under plack -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |nick@bywatersolutions.com, | |srdjan@catalyst.net.nz, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 56016 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56016&action=edit Bug 17392: Make svc/overdrive_proxy plack safe -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Just a try, I am not able to test the whole workflow. Please test and adapt if needed. I think that the problem comes from the fact that the CGI->new method is overwritten from the psgi file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #2)
Just a try, I am not able to test the whole workflow. Please test and adapt if needed. I think that the problem comes from the fact that the CGI->new method is overwritten from the psgi file.
And so the -oldstyle_urls pragma is not taken into account. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56016|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 56054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56054&action=edit Bug 17392 - opac/svc/overdrive_proxy is not plack safe This patch simply replaces the ';' in the param passed to OverDrive with '&' To test: 1 - Enable overdrive (requires an account) 2 - Perform an opac search 3 - Note the number of overdrive results reported 4 - Click the link to view the actualt overdrive results 5 - Note the result numbers don't match 6 - Apply patch 7 - Repeat 1-4 and note results numbers match and results are relevant 8 - Test a search with a ';' to ensure this patch isn't breaking searches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Chris Cormack <chris@bigballofwax.co.nz> 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=17392 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56054|0 |1 is obsolete| | --- Comment #5 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 56069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56069&action=edit Bug 17392 - opac/svc/overdrive_proxy is not plack safe This patch simply replaces the ';' in the param passed to OverDrive with '&' To test: 1 - Enable overdrive (requires an account) 2 - Perform an opac search 3 - Note the number of overdrive results reported 4 - Click the link to view the actualt overdrive results 5 - Note the result numbers don't match 6 - Apply patch 7 - Repeat 1-4 and note results numbers match and results are relevant 8 - Test a search with a ';' to ensure this patch isn't breaking searches Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |7172 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7172 [Bug 7172] Omnibus for Plack variable scoping problems -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=17392 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56069|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 56151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56151&action=edit [PASSED QA] Bug 17392 - opac/svc/overdrive_proxy is not plack safe This patch simply replaces the ';' in the param passed to OverDrive with '&' To test: 1 - Enable overdrive (requires an account) 2 - Perform an opac search 3 - Note the number of overdrive results reported 4 - Click the link to view the actual overdrive results 5 - Note the result numbers don't match 6 - Apply patch 7 - Repeat 1-4 and note results numbers match and results are relevant 8 - Test a search with a ';' to ensure this patch isn't breaking searches Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Verified by reading code - couldn't verify using Overdrive. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #7 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the November 16.11 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #8 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17392 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |7172 Depends on|7172 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7172 [Bug 7172] Omnibus for Plack variable scoping problems -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org