master
Aevann1 2022-01-28 22:02:21 +02:00
parent 9bc39e74bc
commit ecc7f1e622
1 changed files with 6 additions and 3 deletions

View File

@ -17,7 +17,9 @@ def login_get(v):
redir = redir.replace("/logged_out", "").strip()
if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = None
if v and redir: return redirect(redir)
if v and redir:
if redir.startswith(SITE_FULL): return redirect(redir)
elif redir.startswith('/'): return redirect(f'{SITE_FULL}{redir}')
return render_template("login.html", failed=False, redirect=redir)
@ -145,8 +147,9 @@ def login_post():
redir = redir.replace("/logged_out", "").strip()
if not redir.startswith(SITE_FULL) and not redir.startswith('/'): redir = '/'
return redirect(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")
@app.get("/@me")