From 6ebb3c20e178daa87d28c6fde40ce34e8f119b74 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Tue, 1 Feb 2022 17:41:56 +0000 Subject: fix bug creating arbitrarily long query strings when repeatedly clicking login or register buttons --- apioforum/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apioforum/__init__.py b/apioforum/__init__.py index 86e5ff9..a7d70c0 100644 --- a/apioforum/__init__.py +++ b/apioforum/__init__.py @@ -49,7 +49,7 @@ def create_app(): @app.context_processor def path_for_next(): p = request.path - if len(request.query_string) > 0: + if len(request.query_string) > 0 and not p.startswith("/auth"): p += "?" + request.query_string.decode("utf-8") return dict(path_for_next=p) -- cgit v1.2.3