fix login redir bug

master
Aevann1 2022-11-26 07:38:59 +02:00
parent 704fb78f20
commit 4eb66e5802
1 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ def login_post():
redir = request.values.get("redirect", "").strip().rstrip('?').lower()
if redir:
if is_site_url(redir) and redir in NO_LOGIN_REDIRECT_URLS:
if is_site_url(redir) and redir not in NO_LOGIN_REDIRECT_URLS:
return redirect(redir)
return redirect('/')
@ -339,7 +339,7 @@ def sign_up_post(v):
redir = request.values.get("redirect", "").strip().rstrip('?').lower()
if redir:
if is_site_url(redir) or redir in NO_LOGIN_REDIRECT_URLS:
if is_site_url(redir) or redir not in NO_LOGIN_REDIRECT_URLS:
return redirect(redir)
return redirect('/')