Since updating to 3.22.14 which includes the fix for bug 17841, there is a problem when logging out of the OPAC with CAS. Settings: casLogout = Logout Before the update, you weren't redirected back to the OPAC after logout. Bug 17841 was supposed to fix this behaviour. After the update, we are sending the redirect URL in the service parameter of the logout URL: https://.../logout?url=https%3A%2F%2F...%2Fcgi-bin%2Fkoha%2Fopac-main.pl%3Flogout.x%3D1 The CAS logout itself works, but the redirect to Koha seems to be stuck in an "infinite loop". The page reloads again and again. It seems to work ok, when you craft an URL like: https://.../logout?url=https%3A%2F%2F...%2Fcgi-bin%2Fkoha%2Fopac-main.pl%3Flogout.x%3D1 without the logout.x%3D1 parameter at the end of the URL. Tested in Firefox ESR 45.7.0.
Sorry, had the wrong bug number: bug 17481 was the change that changed things...
Upping severity a bit as this is a problem for end users in the OPAC and it looks like Koha is killing the browser. We fixed it temporarily by removing the logout.x=1 from the URL used for redirecting on logout: sub logout_cas { my ($query, $type) = @_; my ( $cas, $uri ) = _get_cas_and_service($query, undef, $type); + $uri =~ s/\?logout\.x=1//; print $query->redirect( $cas->logout_url(url => $uri)); }
Ah yes, because opac-main.pl looks for the existence of the logout param it will just log them out again and again and again. So your fix is the right fix. I will attach a patch here soon
Created attachment 66254 [details] [review] 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
Created attachment 66282 [details] [review] [SIGNED OFF] 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 <katrin.fischer@bsz-bw.de> Patch has been in production use for several months on several instances. Fixes a critical bug.
Created attachment 66456 [details] [review] 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 <katrin.fischer@bsz-bw.de> Patch has been in production use for several months on several instances. Fixes a critical bug. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Looks like a typical workaround, but evidently works. Not tested with CAS.
Pushed to master for 17.11, thanks to everybody involved!
Pushed to 17.05.x, will be in 17.05.04.
This patch has been pushed to 16.11.x and will be in 16.11.12.