fix login redir bug

pull/24/head
Aevann1 2022-11-26 07:38:59 +02:00 committed by geese_suck
parent fac7753800
commit a262702a7e
Signed by: geese_suck
GPG Key ID: 4D09E4B0A7264746
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('/')