From 056b10fcec4a68b9e379f3eb1be9120e7b2b3e98 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 2 Aug 2017 10:15:10 +1200 Subject: [PATCH] Bug 18046: CAS logout infinite redirect To test (You need a CAS server and CAS configured in Koha) 1/ Login using CAS in Koha 2/ Logout in Koha 3/ Notice you get redirected again and again 4/ Apply patch 5/ Login with CAS, then logout 6/ Notice logout works, but no longer infinitely redirected Signed-off-by: Katrin Fischer Patch has been in production use for several months on several instances. Fixes a critical bug. Signed-off-by: Marcel de Rooy Looks like a typical workaround, but evidently works. Not tested with CAS. Signed-off-by: Jonathan Druart (cherry picked from commit 13ca4962068b184f803b6588e53e39209a77f2b6) Signed-off-by: Fridolin Somers (cherry picked from commit c87b963818076a58661922116893ff052b2d76a9) Signed-off-by: Katrin Fischer --- C4/Auth_with_cas.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Auth_with_cas.pm b/C4/Auth_with_cas.pm index b69124b0f7..e14c6e63b9 100644 --- a/C4/Auth_with_cas.pm +++ b/C4/Auth_with_cas.pm @@ -66,6 +66,7 @@ sub getMultipleAuth { sub logout_cas { my ($query, $type) = @_; my ( $cas, $uri ) = _get_cas_and_service($query, undef, $type); + $uri =~ s/\?logout\.x=1//; # We don't want to keep triggering a logout, if we got here, the borrower is already logged out of Koha print $query->redirect( $cas->logout_url(url => $uri)); } -- 2.39.5