From f9fdeed771ad1c0f3438029ce5f25deaf978dea8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 22 Sep 2022 21:42:09 +0200 Subject: [PATCH] fix --- files/helpers/wrappers.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/files/helpers/wrappers.py b/files/helpers/wrappers.py index d580a8a65..0001337a4 100644 --- a/files/helpers/wrappers.py +++ b/files/helpers/wrappers.py @@ -77,7 +77,9 @@ def get_logged_in_user(): g.v = v - if v: v.poor = session.get('poor') + if v: + v.poor = session.get('poor') + v.check_ban_evade() if AEVANN_ID and request.headers.get("Cf-Ipcountry") == 'EG': if v and not v.username.startswith('Aev'): @@ -95,8 +97,6 @@ def auth_desired(f): def wrapper(*args, **kwargs): v = get_logged_in_user() - v.check_ban_evade() - return make_response(f(*args, v=v, **kwargs)) wrapper.__name__ = f.__name__ @@ -115,8 +115,6 @@ def auth_desired_with_logingate(f): if not redir: redir = '/' return redirect(redir) - v.check_ban_evade() - return make_response(f(*args, v=v, **kwargs)) wrapper.__name__ = f.__name__ @@ -127,8 +125,6 @@ def auth_required(f): v = get_logged_in_user() if not v: abort(401) - v.check_ban_evade() - return make_response(f(*args, v=v, **kwargs)) wrapper.__name__ = f.__name__ @@ -141,8 +137,6 @@ def is_not_permabanned(f): v = get_logged_in_user() if not v: abort(401) - - v.check_ban_evade() if v.is_suspended_permanently: return {"error": "Internal server error"}, 500