Bugzilla – Attachment 4921 Details for
Bug 6694
Anonymous sessions not kept when casAuthentication is on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fixes for checkauth and check_api_auth
0001-Bug-6694-Problem-with-casAuthentication-syspref.patch (text/plain), 2.06 KB, created by
Julian Maurice
on 2011-08-10 09:46:43 UTC
(
hide
)
Description:
Fixes for checkauth and check_api_auth
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2011-08-10 09:46:43 UTC
Size:
2.06 KB
patch
obsolete
>From fbf82e24793720249f7031eae6703a4fb28a89f2 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 10 Aug 2011 11:41:06 +0200 >Subject: [PATCH] Bug 6694: Problem with casAuthentication syspref > >A missing test in checkauth caused anonymous session to be destroyed and >re-created at every call when this syspref was set. >Almost the same issue is also fixed in check_api_auth, which caused >C4::Service->init to fail. >--- > C4/Auth.pm | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index 16e908a..62797f9 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -675,7 +675,8 @@ sub checkauth { > $userid = $session->param('id'); > $sessiontype = $session->param('sessiontype'); > } >- if ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) { >+ if ( ( ($query->param('koha_login_context')) && ($query->param('userid') ne $session->param('id')) ) >+ || ( $cas && $query->param('ticket') ) ) { > #if a user enters an id ne to the id in the current session, we need to log them in... > #first we need to clear the anonymous session... > $debug and warn "query id = " . $query->param('userid') . " but session id = " . $session->param('id'); >@@ -738,7 +739,7 @@ sub checkauth { > C4::Context->_new_userenv($sessionID); > $cookie = $query->cookie(CGISESSID => $sessionID); > $userid = $query->param('userid'); >- if ($cas || $userid) { >+ if (($cas && $query->param('ticket')) || $userid) { > my $password = $query->param('password'); > my ($return, $cardnumber); > if ($cas && $query->param('ticket')) { >@@ -1103,7 +1104,7 @@ sub check_api_auth { > unless ($query->param('userid')) { > $sessionID = $query->cookie("CGISESSID"); > } >- if ($sessionID && not $cas) { >+ if ($sessionID && not ($cas && $query->param('PT')) ) { > my $session = get_session($sessionID); > C4::Context->_new_userenv($sessionID); > if ($session) { >-- >1.7.5.4 >
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 6694
:
4921
|
6694