Skip to content

Commit c07b12e

Browse files
Merge pull request #557 from luyuqing/encode_fix
Encoded unicode objects before hashing
2 parents ab2c644 + 539f1e6 commit c07b12e

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)