fix 500 error

master
Aevann 2022-12-28 11:44:39 +02:00
parent 04c91082a5
commit ccfb99cb63
1 changed files with 1 additions and 1 deletions

View File

@ -23,8 +23,8 @@ NO_LOGIN_REDIRECT_URLS = ("/login", "/logout", "/signup", "/forgot", "/reset", "
@app.get("/login")
@auth_desired
def login_get(v:Optional[User]):
if v:
redir = request.values.get("redirect", "").strip().rstrip('?').lower()
if v:
if redir and is_site_url(redir) and redir not in NO_LOGIN_REDIRECT_URLS:
return redirect(redir)
return redirect('/')