Bugzilla – Attachment 162709 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.12 KB, created by
David Cook
on 2024-03-04 04:01:06 UTC
(
hide
)
Description:
Bug 36219: Re-add missing state param for Oauth/OIDC client
Filename:
MIME Type:
Creator:
David Cook
Created:
2024-03-04 04:01:06 UTC
Size:
1.12 KB
patch
obsolete
>From b7a06b54a0cfc381f54171dec966ac7def9b19a3 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 >--- > 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 6883ea9a6c..ad15a87967 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.30.2
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