From 59343ff4415e2a5f5d14719140625c4e80bd55cd Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 14 Nov 2021 17:52:31 +0100 Subject: [PATCH] stages/email: fix missing component in response when retrying email send closes #1791 Signed-off-by: Jens Langhammer --- authentik/flows/stage.py | 2 +- authentik/stages/email/stage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authentik/flows/stage.py b/authentik/flows/stage.py index b0050d3d6..4e29637ee 100644 --- a/authentik/flows/stage.py +++ b/authentik/flows/stage.py @@ -149,7 +149,7 @@ class ChallengeStageView(StageView): ) challenge_response.initial_data["response_errors"] = full_errors if not challenge_response.is_valid(): - LOGGER.warning( + LOGGER.error( "f(ch): invalid challenge response", binding=self.executor.current_binding, errors=challenge_response.errors, diff --git a/authentik/stages/email/stage.py b/authentik/stages/email/stage.py index e0562784e..1920feb9c 100644 --- a/authentik/stages/email/stage.py +++ b/authentik/stages/email/stage.py @@ -39,7 +39,7 @@ class EmailChallengeResponse(ChallengeResponse): component = CharField(default="ak-stage-email") def validate(self, attrs): - raise ValidationError("") + raise ValidationError(detail="email-sent", code="email-sent") class EmailStageView(ChallengeStageView):