python3: ascii-encode saml provider id before hashing it (#31183)
This commit is contained in:
parent
4c9a4359aa
commit
2af185ea6a
|
@ -335,7 +335,8 @@ class LibertyProvider(Service):
|
|||
def save(self, *args, **kwargs):
|
||||
'''Update the SHA1 hash of the entity_id when saving'''
|
||||
if self.protocol_conformance == 3:
|
||||
self.entity_id_sha1 = hashlib.sha1(self.entity_id).hexdigest()
|
||||
self.entity_id_sha1 = hashlib.sha1(self.entity_id.encode('ascii')) \
|
||||
.hexdigest()
|
||||
super(LibertyProvider, self).save(*args, **kwargs)
|
||||
|
||||
def clean(self):
|
||||
|
|
Loading…
Reference in New Issue