From 5327fe599222fac2988e8a5f9d00660fda9949cb Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 26 Mar 2022 00:38:05 +0200 Subject: [PATCH] fd --- files/routes/login.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/files/routes/login.py b/files/routes/login.py index bd1acb9d32..2852d95bc4 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -150,8 +150,9 @@ def login_post(): redir = redir.replace("/logged_out", "").strip() if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = '/' - if redir.startswith(SITE_FULL): return redirect(redir) - if redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}') + if redir: + if redir.startswith(SITE_FULL): return redirect(redir) + if redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}') return redirect(f'{SITE_FULL}/') @app.get("/me")