Skip to content

Commit

Permalink
hotfix: add required digestmod param of hmac init
Browse files Browse the repository at this point in the history
  • Loading branch information
kimjson committed Sep 12, 2021
1 parent 3bab328 commit 6beaae1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/session/sparcsssov2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import hmac
import hashlib
import time
from secrets import token_hex
from urllib.parse import urlencode
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 6beaae1

Please sign in to comment.