Skip to content

Commit

Permalink
wechat bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benben17 committed May 15, 2024
1 parent 67a200a commit 132df47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book/utils/wxMsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def check_signature(token, signature, timestamp, nonce):
"""微信校验签名"""
temp_arr = [token, timestamp, nonce]
if len(temp_arr) > 0:
if len(temp_arr) == 3:
temp_arr.sort()
temp_str = ''.join(temp_arr)
hash_str = hashlib.sha1(temp_str.encode('utf-8')).hexdigest()
Expand Down

0 comments on commit 132df47

Please sign in to comment.