Don't use a login next-url of /logout

If /logout is the current page, redirecting back there after logging in
makes the whole exercise pointless.
This commit is contained in:
Ned Batchelder
2020-09-24 16:00:03 -04:00
parent 31a4b761ad
commit 3ee5a3dd11

View File

@@ -217,5 +217,5 @@ from pipeline_mako import render_require_js_path_overrides
<%def name="login_query()">${
u"?next={next}".format(
next=urlquote_plus(login_redirect_url if login_redirect_url else request.path)
) if (login_redirect_url or request) else ""
) if (login_redirect_url or (request and not request.path.startswith("/logout"))) else ""
}</%def>