Bug 14034: Fix logout on refresh for shibboleth

This is similar to bug 12877

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

While this is missing a detailed test plan, what I did to test was

1/ Login to koha .. it works
2/ Apply patch
3/ Login to koha .. it still works, no regressions. I can't test the
shibboleth part but it doesnt break anything else so I'm happy to sign
off

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>

We had to implement this fix for one of our customers using Shibboleth.
Can verify that it fixes the issue (which, incidentally, breaks
stage-marc-import since that depends on a constant sessionID).

Passing QA (verified with QA tools). Thanks, Martin!

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
Martin Renvoize 2015-09-18 08:10:27 +00:00 committed by Brendan Gallagher
parent c1840b08fb
commit 5c581ccdd0
1 changed files with 3 additions and 1 deletions

View File

@ -810,7 +810,9 @@ sub checkauth {
$sessiontype = $session->param('sessiontype') || '';
}
if ( ( $query->param('koha_login_context') && ( $q_userid ne $s_userid ) )
|| ( $cas && $query->param('ticket') && !C4::Context->userenv->{'id'} ) || ( $shib && $shib_login && !$logout ) ) {
|| ( $cas && $query->param('ticket') && !C4::Context->userenv->{'id'} )
|| ( $shib && $shib_login && !$logout && !C4::Context->userenv->{'id'} )
) {
#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...