From 14d8ba752c4e6f6e976f6f31185400f06b68900d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Fri, 10 Jul 2015 16:19:21 +0200 Subject: [PATCH] saml: remove session message after SSO (#7753) --- tests/test_saml_auth.py | 3 +++ wcs/qommon/saml2.py | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/test_saml_auth.py b/tests/test_saml_auth.py index 058430a..2e676c6 100644 --- a/tests/test_saml_auth.py +++ b/tests/test_saml_auth.py @@ -182,6 +182,7 @@ def test_assertion_consumer_existing_federation(): }) pub._set_request(req) req.session = sessions.Session(id=2) # another session + req.session.message = ('error', 'blah') req.form['SAMLResponse'] = saml_response_body assert req.session.user is None @@ -195,8 +196,10 @@ def test_assertion_consumer_existing_federation(): saml2 = Saml2Directory() assert req.session.user is None + assert req.session.message == ('error', 'blah') body = saml2.assertionConsumerPost() assert req.session.user == '17' + assert req.session.message is None def test_assertion_consumer_redirect_after_url(): setup_environment(pub) diff --git a/wcs/qommon/saml2.py b/wcs/qommon/saml2.py index fb1d9de..c2f5128 100644 --- a/wcs/qommon/saml2.py +++ b/wcs/qommon/saml2.py @@ -369,6 +369,7 @@ class Saml2Directory(Directory): # is not normal pass session.lasso_identity_provider_id = login.remoteProviderId + session.message = None return self.continue_to_after_url() def continue_to_after_url(self): -- 2.1.4