Projet

Général

Profil

0001-saml-remove-session-message-after-SSO-7753.patch

Frédéric Péters, 10 juillet 2015 16:23

Télécharger (1,61 ko)

Voir les différences:

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(+)
tests/test_saml_auth.py
182 182
        })
183 183
    pub._set_request(req)
184 184
    req.session = sessions.Session(id=2) # another session
185
    req.session.message = ('error', 'blah')
185 186
    req.form['SAMLResponse'] = saml_response_body
186 187
    assert req.session.user is None
187 188

  
......
195 196

  
196 197
    saml2 = Saml2Directory()
197 198
    assert req.session.user is None
199
    assert req.session.message == ('error', 'blah')
198 200
    body = saml2.assertionConsumerPost()
199 201
    assert req.session.user == '17'
202
    assert req.session.message is None
200 203

  
201 204
def test_assertion_consumer_redirect_after_url():
202 205
    setup_environment(pub)
wcs/qommon/saml2.py
369 369
                # is not normal
370 370
                pass
371 371
        session.lasso_identity_provider_id = login.remoteProviderId
372
        session.message = None
372 373
        return self.continue_to_after_url()
373 374

  
374 375
    def continue_to_after_url(self):
375
-