From 6ceff2519e2017d860172bf013f323399d1aefa5 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 22 Dec 2021 02:31:37 +0200 Subject: [PATCH 1/3] sfdfsd --- files/helpers/const.py | 6 ------ files/routes/login.py | 6 +++--- files/routes/settings.py | 4 ---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index c3984487ce..2e3721145e 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -130,8 +130,6 @@ if 'rdrama.net' in SITE: MOM_ID = 4588 DONGER_ID = 541 FARTBINN_ID = 2256 - PW1_ID = 3750 - PW2_ID = 7626 BUG_THREAD = 29748 EMOJI_THREAD = 16583 elif SITE == "pcmemes.net": @@ -157,8 +155,6 @@ elif SITE == "pcmemes.net": MOM_ID = 0 DONGER_ID = 0 FARTBINN_ID = 0 - PW1_ID = 0 - PW2_ID = 0 BUG_THREAD = 4103 EMOJI_THREAD = 0 else: @@ -184,8 +180,6 @@ else: MOM_ID = 0 DONGER_ID = 0 FARTBINN_ID = 0 - PW1_ID = 0 - PW2_ID = 0 BUG_THREAD = 0 EMOJI_THREAD = 0 diff --git a/files/routes/login.py b/files/routes/login.py index 213ca6f2ae..da59102137 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -137,9 +137,9 @@ def login_post(): session["session_id"] = token_hex(49) session["lo_user"] = account.id session["login_nonce"] = account.login_nonce + session.permanent = True - if account.id not in (PW1_ID,PW2_ID): check_for_alts(account.id) - + check_for_alts(account.id) redir = request.values.get("redirect", "/").replace("/logged_out", "").strip() @@ -339,6 +339,7 @@ def sign_up_post(v): session["session_id"] = token_hex(49) session["lo_user"] = new_user.id + session.permanent = True g.db.commit() @@ -427,7 +428,6 @@ def post_reset(v): user_id = request.values.get("user_id") - if user_id in (PW1_ID,PW2_ID): abort(403) timestamp = int(request.values.get("time")) token = request.values.get("token") diff --git a/files/routes/settings.py b/files/routes/settings.py index bf8115573e..665b382ee5 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -633,8 +633,6 @@ def verifiedcolor(v): @validate_formkey def settings_security_post(v): if request.values.get("new_password"): - if v.id in (PW1_ID,PW2_ID): return render_template("settings_security.html", v=v, error="This account is protected from password changes.") - if request.values.get("new_password") != request.values.get("cnf_password"): return render_template("settings_security.html", v=v, error="Passwords do not match.") @@ -731,8 +729,6 @@ def settings_security_post(v): @validate_formkey def settings_log_out_others(v): - if v.id in (PW1_ID,PW2_ID): abort(403) - submitted_password = request.values.get("password", "").strip() if not v.verifyPass(submitted_password): From 027bcbabb9a3c45d7c82f79b6984d3ea1327c5ee Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 22 Dec 2021 03:24:23 +0200 Subject: [PATCH 2/3] sfdfsd --- files/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/__main__.py b/files/__main__.py index 4a225db614..683af19d9b 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -58,7 +58,7 @@ app.config["RATELIMIT_ENABLED"] = True app.config["RATELIMIT_DEFAULTS_DEDUCT_WHEN"]=lambda:True app.config["RATELIMIT_DEFAULTS_EXEMPT_WHEN"]=lambda:False app.config["RATELIMIT_HEADERS_ENABLED"]=True -app.config["CACHE_TYPE"] = "redis" +app.config["CACHE_TYPE"] = "filesystem" app.config["CACHE_DIR"] = "cache" app.config["RATELIMIT_STORAGE_URL"] = environ.get("REDIS_URL", "redis://localhost") app.config['MAIL_SERVER'] = 'smtp.gmail.com' From 74ea6e50a01cd13fb4b9b477c6910739686aa52d Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 22 Dec 2021 03:27:24 +0200 Subject: [PATCH 3/3] fdssdf --- files/routes/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 51b32a6e4c..290d2cf191 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -53,7 +53,7 @@ def distribute(v, cid): return f"Each winner has received {coinsperperson} coins!" @app.get("/truescore") -@admin_level_required(2) +@auth_desired def truescore(v): users = g.db.query(User).order_by(User.truecoins.desc()).limit(25).all() if not v or v.oldsite: template = ''