Bugzilla – Attachment 151932 Details for
Bug 33879
check_cookie_auth overwrites interface set by get_template_and_user
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33879: Do no longer overwrite interface in cookie_auth
Bug-33879-Do-no-longer-overwrite-interface-in-cook.patch (text/plain), 1.74 KB, created by
Marcel de Rooy
on 2023-06-01 13:52:03 UTC
(
hide
)
Description:
Bug 33879: Do no longer overwrite interface in cookie_auth
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-06-01 13:52:03 UTC
Size:
1.74 KB
patch
obsolete
>From 23b37921d83ecfdd6421ae8de191fe1d6712f200 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 1 Jun 2023 13:03:50 +0000 >Subject: [PATCH] Bug 33879: Do no longer overwrite interface in cookie_auth >Content-Type: text/plain; charset=utf-8 > >This will only have effect on installations running OPAC and staff >on the same domain name. In that case an OPAC cookie still allows >you to access intranet, and v.v. > >Test plan: >Repeat the following steps WITHOUT this patch and WITH it. >Login via OPAC. >Go to staff. Perform an action that logs the interface in e.g. the >statistics table, like a checkout. >Inspect interface in the corresponding table. Observe difference >that this patch makes. > >With this patch: >Run t/db_dependent/Auth.t. Should pass again. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 07afd24018..7ffc61c9fd 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -1789,7 +1789,10 @@ sub check_cookie_auth { > my $flags = defined($flagsrequired) ? haspermission( $userid, $flagsrequired ) : 1; > if ($flags) { > C4::Context->_new_userenv($sessionID); >- C4::Context->interface($session->param('interface')); >+ if( !C4::Context->interface ) { >+ # No need to override the interface, most often set by get_template_and_user >+ C4::Context->interface($session->param('interface')); >+ } > C4::Context->set_userenv( > $session->param('number'), $session->param('id') // '', > $session->param('cardnumber'), $session->param('firstname'), >-- >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 33879
:
151928
|
151931
|
151932
|
151933
|
152300
|
152301
|
152328
|
152329
|
152366
|
152367
|
152735
|
152736