From c2c720de6fb83aa1acc678de78a1695cf8201eb5 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Wed, 22 Jan 2014 09:38:14 -0500 Subject: [PATCH] Attempt to delete session on TPAC logout Attempt to delete the auth session when we log out of the TPAC. Signed-off-by: Jeff Godin --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm index 0af9399168..31dd67ce6c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm @@ -453,6 +453,16 @@ sub load_logout { my $self = shift; my $redirect_to = shift || $self->cgi->param('redirect_to'); + # Blindly attempt to delete this session, regardless of if it exists + if ($self->cgi->cookie(COOKIE_SES)) { + try{ + my $response = $U->simplereq( + 'open-ils.auth', + 'open-ils.auth.session.delete', + $self->cgi->cookie(COOKIE_SES)); + } catch Error with {}; + } + # If the user was adding anyting to an anonymous cache # while logged in, go ahead and clear it out. $self->clear_anon_cache; -- 2.11.0