summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2018-11-10 20:31:05 +0200
committerGitHub <noreply@github.com>2018-11-10 20:31:05 +0200
commitc07b12e208d6246b2d6219635884c184f1c11649 (patch)
tree04034b5aa7c727315e3308a07f68dd94f66e018e
parentab2c644c74c2590939bcdd92e65e3389bbc44dd6 (diff)
parent539f1e637fb7eda8fa59725e6f4c2d898893589b (diff)
downloadpysaml2-c07b12e208d6246b2d6219635884c184f1c11649.tar.gz
Merge pull request #557 from luyuqing/encode_fix
Encoded unicode objects before hashing
-rwxr-xr-xexample/idp2/idp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/idp2/idp.py b/example/idp2/idp.py
index 5e924f49..0c3d0913 100755
--- a/example/idp2/idp.py
+++ b/example/idp2/idp.py
@@ -371,7 +371,7 @@ class SSO(Service):
@staticmethod
def _store_request(saml_msg):
logger.debug("_store_request: %s", saml_msg)
- key = sha1(saml_msg["SAMLRequest"]).hexdigest()
+ key = sha1(saml_msg["SAMLRequest"].encode()).hexdigest()
# store the AuthnRequest
IDP.ticket[key] = saml_msg
return key