From d21c16c071f3517fb8a9db66695d7ebe4a366adb Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 4 Feb 2022 16:58:41 +0200 Subject: [PATCH] sdf --- files/routes/front.py | 2 +- files/routes/posts.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index 3c06e1ee5..7b1b5a727 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -133,7 +133,7 @@ def notifications(v): @limiter.limit("3/second;30/minute;400/hour;2000/day") @auth_desired def front_all(v, hole=None): - if hole not in holes: hole = None + if hole and hole not in holes: hole = None if g.webview and not session.get("session_id"): session.permanent = True session["session_id"] = secrets.token_hex(49) diff --git a/files/routes/posts.py b/files/routes/posts.py index a818be27d..7f9ffcf63 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -91,7 +91,7 @@ def publish(pid, v): @app.get("/submit/") @auth_required def submit_get(v, hole=None): - if hole not in holes: hole = None + if hole and hole not in holes: hole = None return render_template("submit.html", v=v, hole=hole) @app.get("/post/") @@ -756,7 +756,7 @@ def thumbnail_thread(pid): @limiter.limit("1/second;6/minute;200/hour;1000/day") @auth_required def submit_post(v, hole=None): - if hole not in holes: hole = None + if hole and hole not in holes: hole = None if v.is_suspended: return {"error": "You can't perform this action while banned."}, 403 if v and v.patron: