From 97c49ba9122be02b33c2cf11b46ab30a0f177200 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 28 Dec 2021 08:56:31 +0200 Subject: [PATCH] dfs --- files/routes/front.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/front.py b/files/routes/front.py index 546d24d43..0148dd382 100644 --- a/files/routes/front.py +++ b/files/routes/front.py @@ -130,8 +130,8 @@ def front_all(v): if not session.get("session_id"): session["session_id"] = secrets.token_hex(49) if not v and not request.headers.get("Authorization"): - if g.system == "mobile" and request.path != "/logged_out/mobile/": return redirect(f"/logged_out/mobile{request.full_path.replace('logged_out/','')}") - elif g.system == "desktop" and request.path != "/logged_out/": return redirect(f"/logged_out{request.full_path}") + if g.system == "mobile" and '/mobile' not in request.path: return redirect(f"/logged_out/mobile{request.full_path.replace('logged_out/','')}") + elif g.system == "desktop" and "/logged_out" not in request.path: return redirect(f"/logged_out{request.full_path}") if v and v.is_banned and not v.unban_utc: return render_template('errors/500.html', error=True, v=v), 500