From ea63b8ecd7275ea1a3c0b198884d2b24f4a8ba58 Mon Sep 17 00:00:00 2001 From: rebecca Date: Sat, 31 Oct 2026 17:29:03 +0000 Subject: repair irksome behaviour with next parameter --- apioforum/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apioforum/__init__.py b/apioforum/__init__.py index 276568f..06595c9 100644 --- a/apioforum/__init__.py +++ b/apioforum/__init__.py @@ -49,9 +49,11 @@ def create_app(): @app.context_processor def path_for_next(): - p = request.path - if len(request.query_string) > 0 and not p.startswith("/auth"): - p += "?" + request.query_string.decode("utf-8") + p = request.args.get('next', None) + if p is None: + p = request.path + if len(request.query_string) > 0: + p += "?" + request.query_string.decode("utf-8") return dict(path_for_next=p) app.jinja_env.globals.update(forum_path=forum.forum_path) -- cgit v1.2.3