Bugzilla – Attachment 162711 Details for
Bug 36219
State parameter broken for OIDC/Oauth
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36219: Re-add missing state param for Oauth/OIDC client
Bug-36219-Re-add-missing-state-param-for-OauthOIDC.patch (text/plain), 1.20 KB, created by
Jonathan Druart
on 2024-03-04 12:16:05 UTC
(
hide
)
Description:
Bug 36219: Re-add missing state param for Oauth/OIDC client
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-03-04 12:16:05 UTC
Size:
1.20 KB
patch
obsolete
>From 58b22919331424bd0db775146f1df5c620f2e23b Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Mon, 4 Mar 2024 03:57:27 +0000 >Subject: [PATCH] Bug 36219: Re-add missing state param for Oauth/OIDC client > >This change restores the csrf token added as the state param for >the OAuth/OIDC client. > >Test plan: >0. Apply the patch and restart Starman >1. Test the SSO using the wiki guide > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > Koha/REST/V1/OAuth/Client.pm | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/Koha/REST/V1/OAuth/Client.pm b/Koha/REST/V1/OAuth/Client.pm >index 6883ea9a6cf..ad15a879670 100644 >--- a/Koha/REST/V1/OAuth/Client.pm >+++ b/Koha/REST/V1/OAuth/Client.pm >@@ -94,6 +94,10 @@ sub login { > return $c->redirect_to( $uri . "?auth_error=$error" ); > } > } >+ else { >+ # initial request, generate CSRF token >+ $state = Koha::Token->new->generate_csrf( { session_id => $c->req->cookie('CGISESSID')->value } ); >+ } > > return $c->oauth2->get_token_p( $provider => { ( !$is_callback ? ( state => $state ) : () ), redirect_uri => $redirect_url . $provider . "/" . $interface } )->then( > sub { >-- >2.34.1
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 36219
:
162709
| 162711