Projet

Général

Profil

0002-saml2-store-current-value-of-OPENED_SESSION_COOKIE-i.patch

Benjamin Dauvergne, 06 juillet 2022 19:19

Télécharger (1,62 ko)

Voir les différences:

Subject: [PATCH 2/3] saml2: store current value of OPENED_SESSION_COOKIE in
 session (#67090)

 wcs/qommon/saml2.py    | 5 +++++
 wcs/qommon/sessions.py | 1 +
 2 files changed, 6 insertions(+)
wcs/qommon/saml2.py
375 375
        user = self.lookup_user(session, login)
376 376
        if user:
377 377
            session.set_user(user.id)
378
            # save value of OPENED_SESSION_COOKIE for wcs.root.RootDirectory.try_passive_sso()
379
            OPENED_SESSION_COOKIE = get_publisher().get_site_option('idp_session_cookie_name')
380
            if OPENED_SESSION_COOKIE:
381
                if OPENED_SESSION_COOKIE in get_request().cookies:
382
                    session.opened_session_value = get_request().cookies[OPENED_SESSION_COOKIE]
378 383
        else:
379 384
            return error_page('Error associating user on SSO')
380 385
        session.lasso_identity_provider_id = login.remoteProviderId
wcs/qommon/sessions.py
88 88
    forced = False
89 89
    # should only be overwritten by authentication methods
90 90
    extra_user_variables = None
91
    opened_session_value = None
91 92

  
92 93
    username = None  # only set on password authentication
93 94

  
94
-