Projet

Général

Profil

0001-python3-ascii-encode-saml-provider-id-before-hashing.patch

Paul Marillonnet, 06 mars 2019 22:07

Télécharger (1005 octets)

Voir les différences:

Subject: [PATCH] python3: ascii-encode saml provider id before hashing it
 (#31183)

 src/authentic2/saml/models.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/authentic2/saml/models.py
335 335
    def save(self, *args, **kwargs):
336 336
        '''Update the SHA1 hash of the entity_id when saving'''
337 337
        if self.protocol_conformance == 3:
338
            self.entity_id_sha1 = hashlib.sha1(self.entity_id).hexdigest()
338
            self.entity_id_sha1 = hashlib.sha1(self.entity_id.encode('ascii')) \
339
                    .hexdigest()
339 340
        super(LibertyProvider, self).save(*args, **kwargs)
340 341

  
341 342
    def clean(self):
342
-