From 19d32ef1225100f4c220162d56e207419db96836 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 23 Jan 2026 10:31:32 +0100 Subject: [PATCH] Bug 41521: Fix forbidden patterns (trailing spaces and http) --- lib/WebService/ILS.pm | 10 +++++----- lib/WebService/ILS/OverDrive.pm | 4 ++-- lib/WebService/ILS/OverDrive/Library.pm | 2 +- lib/WebService/ILS/OverDrive/Patron.pm | 10 +++++----- lib/WebService/ILS/RecordedBooks.pm | 2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/WebService/ILS.pm b/lib/WebService/ILS.pm index 84a97bccf42..8a380fd603e 100644 --- a/lib/WebService/ILS.pm +++ b/lib/WebService/ILS.pm @@ -228,7 +228,7 @@ sub BUILD { =head2 user_agent As provided to constructor, or auto created. Useful if one wants to -change user agent attributes on the fly, eg +change user agent attributes on the fly, eg $ils->user_agent->timeout(120); @@ -379,7 +379,7 @@ An example: access_token => $session{ils_access_token}, access_token_type => $session{ils_access_token_type}, }); - + my $checkouts = $ils->checkouts; =head2 Authentication at the provider @@ -408,11 +408,11 @@ An example: client_id => $client_id, client_secret => $client_secret, }); - my $redirect_url = $ils->auth_url("http://myapp.com/ils-auth"); + my $redirect_url = $ils->auth_url("https://myapp.com/ils-auth"); $response->redirect($redirect_url); ... After successful authentication at the provider, provider redirects - back to specified app url (http://myapp.com/ils-auth) + back to specified app url (https://myapp.com/ils-auth) /ils-auth handler: my $auth_token = $req->param( $ils->auth_token_param_name ) @@ -584,7 +584,7 @@ sub check_response { Example: - my $res = eval { $ils->checkout($id) }; + my $res = eval { $ils->checkout($id) }; if ($@) { my $msg = $ils->error_message($@); display($msg); diff --git a/lib/WebService/ILS/OverDrive.pm b/lib/WebService/ILS/OverDrive.pm index bec58af19ae..963484c8965 100644 --- a/lib/WebService/ILS/OverDrive.pm +++ b/lib/WebService/ILS/OverDrive.pm @@ -34,8 +34,8 @@ use parent qw(WebService::ILS::JSON); use constant API_VERSION => "v1"; -use constant DISCOVERY_API_URL => "http://api.overdrive.com/"; -use constant TEST_DISCOVERY_API_URL => "http://integration.api.overdrive.com/"; +use constant DISCOVERY_API_URL => "https://api.overdrive.com/"; +use constant TEST_DISCOVERY_API_URL => "https://integration.api.overdrive.com/"; =head1 CONSTRUCTOR diff --git a/lib/WebService/ILS/OverDrive/Library.pm b/lib/WebService/ILS/OverDrive/Library.pm index eb2719897ae..2e18a97d3d6 100644 --- a/lib/WebService/ILS/OverDrive/Library.pm +++ b/lib/WebService/ILS/OverDrive/Library.pm @@ -42,7 +42,7 @@ sub collection_token { if (my $collection_token = $self->SUPER::collection_token) { return $collection_token; } - + $self->native_library_account; my $collection_token = $self->SUPER::collection_token or die "Library has no collections\n"; diff --git a/lib/WebService/ILS/OverDrive/Patron.pm b/lib/WebService/ILS/OverDrive/Patron.pm index 0cbb3d243c3..e1726b39cda 100644 --- a/lib/WebService/ILS/OverDrive/Patron.pm +++ b/lib/WebService/ILS/OverDrive/Patron.pm @@ -31,8 +31,8 @@ use Data::Dumper; use parent qw(WebService::ILS::OverDrive); -use constant CIRCULATION_API_URL => "http://patron.api.overdrive.com/"; -use constant TEST_CIRCULATION_API_URL => "http://integration-patron.api.overdrive.com/"; +use constant CIRCULATION_API_URL => "https://patron.api.overdrive.com/"; +use constant TEST_CIRCULATION_API_URL => "https://integration-patron.api.overdrive.com/"; use constant OAUTH_BASE_URL => "https://oauth.overdrive.com/"; use constant TOKEN_URL => OAUTH_BASE_URL . 'token'; use constant AUTH_URL => OAUTH_BASE_URL . 'auth'; @@ -123,7 +123,7 @@ An example: client_secret => $client_secret, library_id => $library_id, }); - my $redirect_url = $overdrive->auth_url("http://myapp.com/overdrive-auth"); + my $redirect_url = $overdrive->auth_url("https://myapp.com/overdrive-auth"); $response->redirect($redirect_url); ... /overdrive-auth handler: @@ -253,7 +253,7 @@ sub make_access_token_request { $user_id, $self->password, $self->website_id, $self->authorization_name ); } - + die $self->ERROR_NOT_AUTHENTICATED."\n"; } @@ -277,7 +277,7 @@ sub collection_token { if (my $collection_token = $self->SUPER::collection_token) { return $collection_token; } - + $self->native_patron; # sets collection_token as a side-effect my $collection_token = $self->SUPER::collection_token or die "Patron has no collections\n"; diff --git a/lib/WebService/ILS/RecordedBooks.pm b/lib/WebService/ILS/RecordedBooks.pm index 0e827a809c2..c8f66811f50 100644 --- a/lib/WebService/ILS/RecordedBooks.pm +++ b/lib/WebService/ILS/RecordedBooks.pm @@ -639,7 +639,7 @@ sub native_item_summary { =head2 native_holds () -See L +See L =cut -- 2.43.0