Fixed login redirect page [closes #154]

This commit is contained in:
Fabio Manganiello 2020-09-27 17:20:14 +02:00
parent 00012aacae
commit 07336d3272
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ def authenticate(redirect_page='', skip_auth_methods=None, check_csrf_token=Fals
if session_auth_ok:
return f(*args, **kwargs)
return redirect('/login?redirect=' + redirect_page, 307)
return redirect('/login?redirect=' + (redirect_page or request.url), 307)
# CSRF token check
if check_csrf_token: