From e52c9643542044b2149dd2bc41171a9384ac34ed Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 22 Dec 2022 23:28:26 +0100 Subject: [PATCH] flows: fix redirect from plan context "redirect" not being wrapped in flow response Signed-off-by: Jens Langhammer --- authentik/flows/views/executor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/flows/views/executor.py b/authentik/flows/views/executor.py index cb85fd93d..cce3fa6d0 100644 --- a/authentik/flows/views/executor.py +++ b/authentik/flows/views/executor.py @@ -378,7 +378,9 @@ class FlowExecutorView(APIView): # an expression policy or authentik itself, so we don't # check if its an absolute URL or a relative one self.cancel() - return redirect(self.plan.context.get(PLAN_CONTEXT_REDIRECT)) + return to_stage_response( + self.request, redirect(self.plan.context.get(PLAN_CONTEXT_REDIRECT)) + ) next_param = self.request.session.get(SESSION_KEY_GET, {}).get( NEXT_ARG_NAME, "authentik_core:root-redirect" )