summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjschneider <jschneider@3ed937ae-f919-0410-9a43-8e6f19e4ba6e>2009-09-30 17:02:36 (GMT)
committerjschneider <jschneider@3ed937ae-f919-0410-9a43-8e6f19e4ba6e>2009-09-30 17:02:36 (GMT)
commitf85cca12574fa76d0fb45d871373c63322cb61a8 (patch)
tree713bccd177651cb3e6fab3d0c87f94561ce14920
parent396bcbfe85ec01aa30447f950c14bb9b18daaea9 (diff)
downloadlarpe-f85cca12574fa76d0fb45d871373c63322cb61a8.zip
larpe-f85cca12574fa76d0fb45d871373c63322cb61a8.tar.gz
larpe-f85cca12574fa76d0fb45d871373c63322cb61a8.tar.bz2
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
-rw-r--r--larpe/trunk/larpe/saml2.ptl6
1 files 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]