From 4eb9483e89e3141eb853b2d38a41b4d4dd450cfb Mon Sep 17 00:00:00 2001 From: Mihail Shevernev <144367664+desspperate@users.noreply.github.com> Date: Tue, 15 Jul 2025 23:51:53 +0300 Subject: [PATCH] Update web_app.py --- aiogram/utils/web_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiogram/utils/web_app.py b/aiogram/utils/web_app.py index 192776fd..759f268c 100644 --- a/aiogram/utils/web_app.py +++ b/aiogram/utils/web_app.py @@ -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(