Skip to content

Commit 539f1e6

Browse files
committed
Fixed Unicode-objects must be encoded before hashing bug
1 parent ab2c644 commit 539f1e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

example/idp2/idp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def do(self, query, binding_in, relay_state="", encrypt_cert=None,
371371
@staticmethod
372372
def _store_request(saml_msg):
373373
logger.debug("_store_request: %s", saml_msg)
374-
key = sha1(saml_msg["SAMLRequest"]).hexdigest()
374+
key = sha1(saml_msg["SAMLRequest"].encode()).hexdigest()
375375
# store the AuthnRequest
376376
IDP.ticket[key] = saml_msg
377377
return key

0 commit comments

Comments
 (0)