From 253b17dbdfcbb44b75c77c6bd15bcb81112f8d41 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 13 Aug 2021 04:04:26 +0200 Subject: [PATCH] fddf --- files/routes/comments.py | 2 +- files/routes/front.py | 2 +- files/routes/posts.py | 2 +- files/routes/users.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 15ca80652..da7e40a98 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -34,7 +34,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None): if not v and "logged_out" not in request.path: return redirect(f"/logged_out/comment/{cid}") - if v and "logged_out" in request.path: return redirect(f"/comment/{cid}") + if v and "logged_out" in request.full_path: return redirect(f"/comment/{cid}") try: cid = int(cid) except: diff --git a/files/routes/front.py b/files/routes/front.py index 721787728..50f860687 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -191,7 +191,7 @@ def front_all(v): if not v and request.path == "/": return redirect("/logged_out") - if v and "logged_out" in request.path: return redirect("/") + if v and "logged_out" in request.full_path: return redirect("/") try: page = int(request.args.get("page") or 1) except: abort(400) diff --git a/files/routes/posts.py b/files/routes/posts.py index dc3e839fd..4e8997438 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -53,7 +53,7 @@ def post_id(pid, anything=None, v=None): if not v and "logged_out" not in request.path: return redirect(f"/logged_out/post/{pid}") - if v and "logged_out" in request.path: return redirect(f"/post/{pid}") + if v and "logged_out" in request.full_path: return redirect(f"/post/{pid}") try: pid = int(pid) except Exception as e: pass diff --git a/files/routes/users.py b/files/routes/users.py index e6a08c6cd..632ca2f0c 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -281,7 +281,7 @@ def u_username(username, v=None): if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}") - if v and "logged_out" in request.path: return redirect(f"/@{username}") + if v and "logged_out" in request.full_path: return redirect(f"/@{username}") # username is unique so at most this returns one result. Otherwise 404 @@ -402,7 +402,7 @@ def u_username_comments(username, v=None): if not v and "logged_out" not in request.path: return redirect(f"/logged_out/@{username}/comments") - if v and "logged_out" in request.path: return redirect(f"/@{username}/comments") + if v and "logged_out" in request.full_path: return redirect(f"/@{username}/comments") # username is unique so at most this returns one result. Otherwise 404