flows: fix redirect from plan context "redirect" not being wrapped in flow response

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-12-22 23:28:26 +01:00
parent c635487210
commit e52c964354
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -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"
)