Bugzilla – Attachment 38627 Details for
Bug 13932
Allow a header to be considered trusted to provide the userid
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13932: unset userenv when using trusted header
Bug-13932-unset-userenv-when-using-trusted-header.patch (text/plain), 1.30 KB, created by
Robin Sheat
on 2015-04-29 05:28:03 UTC
(
hide
)
Description:
Bug 13932: unset userenv when using trusted header
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2015-04-29 05:28:03 UTC
Size:
1.30 KB
patch
obsolete
>From 59704c3960a5daee0eae3e2cc4488944ac874789 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Wed, 29 Apr 2015 17:26:11 +1200 >Subject: [PATCH] Bug 13932: unset userenv when using trusted header > >As the trusted header system doesn't keep a session hanging around, when >running with plack it can end up with the userenv of another user, which >is bad. So this clears it forcing it to be recreated cleanly. >--- > C4/Auth.pm | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 6090f6b..3451bad 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -698,6 +698,10 @@ sub checkauth { > -expires => '', > -HttpOnly => 1, > ); >+ >+ # Unset the userenv as we don't have a sessionID anyway, and it risks >+ # getting the environment for another user, which is quite bad. >+ C4::Context::_new_userenv(undef); > $loggedin = check_user_exists($userid); > } elsif ( $persona ){ > # we dont want to set a session because we are being called by a persona callback >@@ -886,7 +890,7 @@ sub checkauth { > $return = $value ? 1 : 0; > $userid = $value; > >- } >+ } > else { > my $retuserid; > ( $return, $cardnumber, $retuserid ) = >-- >2.1.0
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 13932
:
38301
| 38627