stages/authenticator_validate: fix double-negation of password-less check

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-06-07 09:52:10 +02:00
parent 192001f193
commit 7d84a71a01

View file

@ -374,7 +374,7 @@ class AuthenticatorValidateStageView(ChallengeStageView):
# All validation is done by the serializer # All validation is done by the serializer
user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER) user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER)
if not user: if not user:
if not "webauthn" not in response.data: if "webauthn" not in response.data:
return self.executor.stage_invalid() return self.executor.stage_invalid()
webauthn_device: WebAuthnDevice = response.device webauthn_device: WebAuthnDevice = response.device
self.logger.debug("Set user from user-less flow", user=webauthn_device.user) self.logger.debug("Set user from user-less flow", user=webauthn_device.user)