Bugzilla – Attachment 154781 Details for
Bug 34513
Authenticated users can bypass permissions and view some privileged pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34513: Set auth state correctly when changing auth sessions
Bug-34513-Set-auth-state-correctly-when-changing-a.patch (text/plain), 1.50 KB, created by
Marcel de Rooy
on 2023-08-25 08:56:17 UTC
(
hide
)
Description:
Bug 34513: Set auth state correctly when changing auth sessions
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-08-25 08:56:17 UTC
Size:
1.50 KB
patch
obsolete
>From 9814b0a52578904a4e2c23593c856df4f8502b72 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 11 Aug 2023 03:03:01 +0000 >Subject: [PATCH] Bug 34513: Set auth state correctly when changing auth > sessions >Content-Type: text/plain; charset=utf-8 > >This patch sets the $auth_state to failed when changing auth sessions, >so that the new login attempt gets processed correctly (instead >of skipping the authorization step). > >Test plan: >0. Apply the patch >1. koha-plack --reload kohadev >2. Go to >http://localhost:8081/cgi-bin/koha/admin/preferences.pl?tab=&op=search&searchfield=baseurl >3. Log in as an OPAC user with 0 permissions >4. Note the auth screen "Error: You do not have permission to access this page" >5. Click "Log in" >6. Note that you're still shown a login screen (and that you've been logged out of >your previous authenticated session) > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Auth.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 9b298eed87..cf1bfdd509 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -918,6 +918,7 @@ sub checkauth { > C4::Context::_unset_userenv($sessionID); > $sessionID = undef; > undef $userid; # IMPORTANT: this assures us a new session in code below >+ $auth_state = 'failed'; > } elsif (!$logout) { > > $cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie( >-- >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 34513
:
154357
|
154439
|
154440
|
154743
|
154744
|
154745
|
154746
| 154781 |
154782
|
154783
|
154784