diff --git a/files/routes/errors.py b/files/routes/errors.py index 89f7da9fe..54f9f5923 100644 --- a/files/routes/errors.py +++ b/files/routes/errors.py @@ -18,7 +18,8 @@ def error_401(e): else: path = request.path qs = urlencode(dict(request.values)) - argval = quote(f"{path}?{qs}", safe='') + argval = quote(f"{path}?{qs}", safe='').replace('/logged_out','') + if not argval: argval = '/' if session.get("history"): return redirect(f"/login?redirect={argval}") else: return redirect(f"/signup?redirect={argval}")