Bugzilla – Attachment 56069 Details for
Bug 17392
opac/svc/overdrive_proxy is not plack safe
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17392 - opac/svc/overdrive_proxy is not plack safe
Bug-17392---opacsvcoverdriveproxy-is-not-plack-saf.patch (text/plain), 1.49 KB, created by
Chris Cormack
on 2016-10-06 08:40:11 UTC
(
hide
)
Description:
Bug 17392 - opac/svc/overdrive_proxy is not plack safe
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2016-10-06 08:40:11 UTC
Size:
1.49 KB
patch
obsolete
>From 6076ad750a1af24fa4ce460c0f9376135891f024 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 5 Oct 2016 13:26:09 +0000 >Subject: [PATCH] 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> >--- > opac/svc/overdrive_proxy | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/opac/svc/overdrive_proxy b/opac/svc/overdrive_proxy >index fdddbbb..052a7b9 100755 >--- a/opac/svc/overdrive_proxy >+++ b/opac/svc/overdrive_proxy >@@ -60,8 +60,10 @@ if ( !IsOverDriveEnabled() || !( $token = GetOverDriveToken() ) ) { > > exit; > } >+my $fixed_query = $query->query_string; >+$fixed_query =~ tr/;/&/; > >-my $request = HTTP::Request::Common::GET( "https://api.overdrive.com/v1" . $query->path_info . '?' . $query->query_string ); >+my $request = HTTP::Request::Common::GET( "https://api.overdrive.com/v1" . $query->path_info . '?' . $fixed_query ); > $request->header( Authorization => $token ); > > my $ua = LWP::UserAgent->new( "Koha " . Koha::version() ); >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17392
:
56016
|
56054
|
56069
|
56151