diff --git a/files/routes/comments.py b/files/routes/comments.py index 05d20b93f..9d00b72a8 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -68,7 +68,7 @@ def pusher_thread(interests, c, username): 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"/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(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 d3d03586a..43b82221b 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -173,7 +173,7 @@ def front_all(v, sub=None, subdomain=None): session["session_id"] = secrets.token_hex(49) 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'): return redirect(request.full_path.replace('/logged_out','')) if sub: sub = g.db.query(Sub).filter_by(name=sub.strip().lower()).one_or_none() diff --git a/files/routes/posts.py b/files/routes/posts.py index 61861347c..a238b3e6f 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -120,7 +120,7 @@ def submit_get(v, sub=None): def post_id(pid, anything=None, v=None, sub=None): 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'): return redirect(request.full_path.replace('/logged_out','')) try: pid = int(pid) except Exception as e: pass diff --git a/files/routes/static.py b/files/routes/static.py index 4c212e669..404d4eadd 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -62,7 +62,7 @@ def marsey_list(): @auth_desired def sidebar(v): 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'): return redirect(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 302abecea..6380d1db8 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -864,7 +864,7 @@ 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 v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(request.full_path.replace('/logged_out','')) u = get_user(username, v=v) @@ -953,7 +953,7 @@ 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 v and request.path.startswith('/logged_out'): v = None + if v and request.path.startswith('/logged_out'): return redirect(request.full_path.replace('/logged_out','')) user = get_user(username, v=v) @@ -1145,7 +1145,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"/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(request.full_path.replace('/logged_out','')) try: id = int(id) except: