From a86564b57312bb7e797c68b096425e8cd5b8d6bd Mon Sep 17 00:00:00 2001 From: chenwj113 Date: Sat, 20 May 2023 23:56:22 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/sign.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/sign.py b/src/utils/sign.py index bdffe79..7df14ad 100644 --- a/src/utils/sign.py +++ b/src/utils/sign.py @@ -9,7 +9,7 @@ def check_signature(signature, timestamp, nonce, token): :param token: """ unsign_str = "".join(sorted([timestamp, nonce, token])) - signed_str = hashlib.sha1(unsign_str).digest() + signed_str = hashlib.sha1(unsign_str.encode()).digest() if signature == signed_str: return True else: