From 6beaae1c85472ecaa0d1cdf53f9b9b9be76a27eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=9E=AC=EC=84=B1=20=28Kim=2C=20Jaesung=29?= <15705385+sundoufu@users.noreply.github.com> Date: Sun, 12 Sep 2021 18:43:29 +0900 Subject: [PATCH] hotfix: add required digestmod param of hmac init --- apps/session/sparcsssov2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/session/sparcsssov2.py b/apps/session/sparcsssov2.py index 989e5fe8c..3dfac8052 100644 --- a/apps/session/sparcsssov2.py +++ b/apps/session/sparcsssov2.py @@ -1,4 +1,5 @@ import hmac +import hashlib import time from secrets import token_hex from urllib.parse import urlencode @@ -52,7 +53,7 @@ def _sign_payload(self, payload, append_timestamp=True): payload.append(timestamp) msg = ''.join(list(map(str, payload))).encode() - sign = hmac.new(self.secret_key, msg).hexdigest() + sign = hmac.new(self.secret_key, msg, hashlib.md5).hexdigest() return sign, timestamp def _validate_sign(self, payload, timestamp, sign):