From f85cca12574fa76d0fb45d871373c63322cb61a8 Mon Sep 17 00:00:00 2001 From: jschneider Date: Wed, 30 Sep 2009 17:02:36 +0000 Subject: [PATCH] Fix logout bug * larpe/saml2.ptl: there is not always a cookie attribute in session and the recuperation of the user object was wrong git-svn-id: svn+ssh://labs.libre-entreprise.org/svnroot/larpe@484 3ed937ae-f919-0410-9a43-8e6f19e4ba6e --- larpe/trunk/larpe/saml2.ptl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/larpe/trunk/larpe/saml2.ptl b/larpe/trunk/larpe/saml2.ptl index 7e1fb87..758ba78 100644 --- a/larpe/trunk/larpe/saml2.ptl +++ b/larpe/trunk/larpe/saml2.ptl @@ -403,8 +403,10 @@ class Saml2(Saml2Directory): and ( not session_index or session2.lasso_session_indexes.get(providerId) == session_index): if session2.users.has_key(providerId): - # try a local logout - site_authentication.get_site_authentication(Host.get_host_from_url()).local_logout(user=session2.users[providerId], cookies=getattr(session2,'cookies')) + # local logout + site_auth = site_authentication.get_site_authentication(Host.get_host_from_url()) + site_auth.local_logout(user=session2.get_user(providerId), + cookies=getattr(session2,'cookies', None)) del session2.users[providerId] if session2.lasso_session_dumps.has_key(providerId): del session2.lasso_session_dumps[providerId]