Bugzilla – Attachment 163127 Details for
Bug 34164
OAuth2/OIDC should redirect to page that initiated login
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Return to the referring URL when signing in using GoogleOpenID
0001-Return-to-the-page-you-were-on-when-authenticating-s.patch (text/plain), 1.37 KB, created by
Nicholas van Oudtshoorn
on 2024-03-14 04:13:08 UTC
(
hide
)
Description:
Return to the referring URL when signing in using GoogleOpenID
Filename:
MIME Type:
Creator:
Nicholas van Oudtshoorn
Created:
2024-03-14 04:13:08 UTC
Size:
1.37 KB
patch
obsolete
>From eba0d9b9889cb86d4b0b44df4a50cd3b7423ecec Mon Sep 17 00:00:00 2001 >From: Nicholas van Oudtshoorn <vanoudt@gmail.com> >Date: Thu, 14 Mar 2024 11:47:06 +0800 >Subject: [PATCH] Return to the page you were on when authenticating, stripping > the logout instruction from the referer uri > >--- > opac/cgi-bin/opac/svc/auth/googleopenidconnect | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/opac/cgi-bin/opac/svc/auth/googleopenidconnect b/opac/cgi-bin/opac/svc/auth/googleopenidconnect >index cde334f..6944f3f 100755 >--- a/opac/cgi-bin/opac/svc/auth/googleopenidconnect >+++ b/opac/cgi-bin/opac/svc/auth/googleopenidconnect >@@ -214,12 +214,14 @@ elsif ( defined $query->param('code') ) { > #handle redirect to main.pl, for private opac > my $uri; > my $referer = $session->param( 'auth-refer-uri' ); >+ my $regex = qr/logout\.x=1/mp; >+ my $fixed_referer = $referer =~ s/$regex//rg; > if (C4::Context->preference('OpacPublic') ) { > $uri = '/cgi-bin/koha/opac-user.pl'; > } else { > $uri = '/cgi-bin/koha/opac-main.pl'; > } >- $uri = $referer; >+ $uri = $fixed_referer; > print $query->redirect( > -uri => $uri, > -cookie => $cookie >-- >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 34164
:
163127
|
163128
|
163129
|
163493
|
163494
|
163495
|
163496
|
164979
|
164980