From 8d77d0e98275f2ddea17ba887693a1df13b3d90f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 11 Feb 2022 20:44:12 +0200 Subject: [PATCH] gdf --- files/routes/comments.py | 2 +- files/routes/front.py | 2 +- files/routes/posts.py | 2 +- files/routes/static.py | 4 ++-- files/routes/users.py | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 498546084..8c9939e26 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -35,7 +35,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None): if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) try: cid = int(cid) except: abort(404) diff --git a/files/routes/front.py b/files/routes/front.py index a3f7944b6..bf988f6b1 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -144,7 +144,7 @@ def front_all(v, sub=None): if not v and request.path == "/" and not request.headers.get("Authorization"): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) try: page = max(int(request.values.get("page", 1)), 1) except: abort(400) diff --git a/files/routes/posts.py b/files/routes/posts.py index 5540a45e2..ee3b5160c 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -110,7 +110,7 @@ def post_id(pid, anything=None, v=None, sub=None): if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) try: pid = int(pid) diff --git a/files/routes/static.py b/files/routes/static.py index 5f52974ed..9f4c14547 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -39,7 +39,7 @@ def marsey_list(): @auth_desired def terms(v): if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) return render_template("terms.html", v=v) @@ -48,7 +48,7 @@ def terms(v): @auth_desired def sidebar(v): if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) return render_template('sidebar.html', v=v) diff --git a/files/routes/users.py b/files/routes/users.py index 4c82646b3..c60d1d0f9 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -687,7 +687,7 @@ def u_username(username, v=None): if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) @@ -794,7 +794,7 @@ def u_username_comments(username, v=None): if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) user = get_user(username, v=v) @@ -968,7 +968,7 @@ def remove_follow(username, v): @auth_desired def user_profile_uid(v, id): if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}") - if v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(SITE_FULL + request.full_path.replace('/logged_out','')) try: id = int(id) except: abort(404)