Projet

Général

Profil

0001-utils-make-sure-user_nameid-user_email-cannot-be-for.patch

Frédéric Péters, 24 juin 2017 11:22

Télécharger (918 octets)

Voir les différences:

Subject: [PATCH] utils: make sure user_nameid/user_email cannot be forged
 (#17173)

 combo/utils.py | 2 ++
 1 file changed, 2 insertions(+)
combo/utils.py
180 180
    if context:
181 181
        template_vars.update(context)
182 182
        user = getattr(context.get('request'), 'user', None)
183
        template_vars['user_email'] = ''
184
        template_vars['user_nameid'] = ''
183 185
        if user and user.is_authenticated():
184 186
            template_vars['user_email'] = quote(user.email)
185 187
            if hasattr(user, 'saml_identifiers') and user.saml_identifiers.exists():
186
-