mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Remove brackets in auth widget check.
This commit is contained in:
parent
1d700f846e
commit
9474ddfa91
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ def generate_hash(data: dict, token: str) -> str:
|
|||
secret = hashlib.sha256()
|
||||
secret.update(token.encode('utf-8'))
|
||||
sorted_params = collections.OrderedDict(sorted(data.items()))
|
||||
msg = '\n'.join(["{}={}".format(k, v) for k, v in sorted_params.items() if k != 'hash'])
|
||||
msg = '\n'.join("{}={}".format(k, v) for k, v in sorted_params.items() if k != 'hash')
|
||||
return hmac.new(secret.digest(), msg.encode('utf-8'), digestmod=hashlib.sha256).hexdigest()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue