Bugzilla – Attachment 68370 Details for
Bug 18890
REST API: Fix fetching operation spec in route chain
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18890: REST API: Fix fetching operation spec in route chain
Bug-18890-REST-API-Fix-fetching-operation-spec-in-.patch (text/plain), 1.79 KB, created by
Mark Tompsett
on 2017-10-23 05:52:10 UTC
(
hide
)
Description:
Bug 18890: REST API: Fix fetching operation spec in route chain
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-10-23 05:52:10 UTC
Size:
1.79 KB
patch
obsolete
>From 4541ada4233ff8db3a0d155d7ecb688ad5b5b222 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@jns.fi> >Date: Mon, 3 Jul 2017 15:54:01 +0300 >Subject: [PATCH] Bug 18890: REST API: Fix fetching operation spec in route > chain > >Mojolicious::Plugin::OpenAPI version 1.17 added a feature for fetching API spec >in route chain. For us, this type of functionality is used in authentication with >our own workaround introduced in Bug 18137. Our own workaround no longer works if >M::P::OpenAPI version >=1.17. > >When upgrading Mojolicious::Plugin::OpenAPI dependency, this patch will fix >the issue. > >To test: >1. prove t/db_dependent/api/v1 > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Installer/PerlDependencies.pm | 2 +- > Koha/REST/V1/Auth.pm | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm >index 3cacafc..0cbb7e3 100644 >--- a/C4/Installer/PerlDependencies.pm >+++ b/C4/Installer/PerlDependencies.pm >@@ -785,7 +785,7 @@ our $PERL_DEPS = { > 'Mojolicious::Plugin::OpenAPI' => { > 'usage' => 'REST API', > 'required' => '1', >- 'min_ver' => '1.15', >+ 'min_ver' => '1.17', > }, > 'JSON::Validator' => { > 'usage' => 'REST API', >diff --git a/Koha/REST/V1/Auth.pm b/Koha/REST/V1/Auth.pm >index 77864eb..27ee431 100644 >--- a/Koha/REST/V1/Auth.pm >+++ b/Koha/REST/V1/Auth.pm >@@ -108,7 +108,7 @@ if authorization is required and user has required permissions to access. > sub authenticate_api_request { > my ( $c ) = @_; > >- my $spec = $c->match->endpoint->pattern->defaults->{'openapi.op_spec'}; >+ my $spec = $c->openapi->spec; > my $authorization = $spec->{'x-koha-authorization'}; > my $cookie = $c->cookie('CGISESSID'); > my ($session, $user); >-- >2.1.4
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 18890
:
64774
|
64777
|
64778
| 68370 |
68371
|
68372