From b1bca1374dacead1cefacb8ef9b7900c4b2b6172 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 9 Jun 2019 18:39:40 +0200 Subject: [PATCH] Fix telegram login (derp!) --- royalnet/__init__.py | 2 +- royalnet/web/blueprints/tglogin/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/royalnet/__init__.py b/royalnet/__init__.py index c8ee0950..668a0ab6 100644 --- a/royalnet/__init__.py +++ b/royalnet/__init__.py @@ -1,5 +1,5 @@ from . import audio, bots, commands, database, network, utils, error, web -version = "5.0a17" +version = "5.0a18" __all__ = ["audio", "bots", "commands", "database", "network", "utils", "error", "web"] diff --git a/royalnet/web/blueprints/tglogin/__init__.py b/royalnet/web/blueprints/tglogin/__init__.py index bdc393da..97486535 100644 --- a/royalnet/web/blueprints/tglogin/__init__.py +++ b/royalnet/web/blueprints/tglogin/__init__.py @@ -22,7 +22,7 @@ def tglogin_done(): for field in f.request.args: if field == "hash": continue - data_check_string += f"{field}={f.request.args['field']}\n" + data_check_string += f"{field}={f.request.args[field]}\n" data_check_string.rstrip("\n") secret_key = hashlib.sha256(f.current_app.config["TG_AK"]) hex_data = hmac.new(key=secret_key, msg=data_check_string, digestmod="sha256").hexdigest()