From abb86c1035599135e8d3df828ab2a93e3cacbe89 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 1 Oct 2021 22:11:44 +0200 Subject: [PATCH] dfsfsd --- files/routes/comments.py | 2 +- files/routes/front.py | 2 +- files/routes/posts.py | 2 +- files/routes/users.py | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 576e9b526..3bcd402ac 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -27,7 +27,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}") - if v and request.full_path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): v = None try: cid = int(cid) except: diff --git a/files/routes/front.py b/files/routes/front.py index a2b46d480..4aee992e4 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -116,7 +116,7 @@ def front_all(v): if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}") - if v and request.path.startswith('logged_out'): v = None + if v and request.path.startswith('/logged_out'): v = None try: page = int(request.values.get("page") or 1) except: abort(400) diff --git a/files/routes/posts.py b/files/routes/posts.py index b061ea56c..ae38d62b4 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -86,7 +86,7 @@ def post_id(pid, anything=None, v=None): if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"): return redirect(f"/logged_out{request.full_path}") - if v and request.full_path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): v = None try: pid = int(pid) except Exception as e: pass diff --git a/files/routes/users.py b/files/routes/users.py index 8e2982491..b08e0361a 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -395,9 +395,9 @@ def visitors(v): def u_username(username, v=None): - if not v and not request.path.startswith('logged_out'): return redirect(f"/logged_out{request.full_path}") + if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}") - if v and request.path.startswith('logged_out'): v = None + if v and request.path.startswith('/logged_out'): v = None # username is unique so at most this returns one result. Otherwise 404 @@ -508,9 +508,9 @@ def u_username(username, v=None): def u_username_comments(username, v=None): - if not v and not request.path.startswith('logged_out'): return redirect(f"/logged_out{request.full_path}") + if not v and not request.path.startswith('/logged_out'): return redirect(f"/logged_out{request.full_path}") - if v and request.path.startswith('logged_out'): v = None + if v and request.path.startswith('/logged_out'): v = None # username is unique so at most this returns one result. Otherwise 404