mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update web_app.py
This commit is contained in:
parent
7a517f1eba
commit
4eb9483e89
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ def check_webapp_signature(token: str, init_data: str) -> bool:
|
|||
calculated_hash = hmac.new(
|
||||
key=secret_key.digest(), msg=data_check_string.encode(), digestmod=hashlib.sha256
|
||||
).hexdigest()
|
||||
return calculated_hash == hash_
|
||||
return hmac.compare_digest(calculated_hash, hash_)
|
||||
|
||||
|
||||
def parse_webapp_init_data(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue