From 34ec1ed294edb2b2245c3baf14a08b818c8194d9 Mon Sep 17 00:00:00 2001 From: Jan Pochyla Date: Wed, 28 Aug 2019 14:27:25 +0200 Subject: [PATCH] core/webauthn: fix bug introduced in bb2556 Fixes #448 --- core/src/apps/webauthn/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/apps/webauthn/__init__.py b/core/src/apps/webauthn/__init__.py index 10510616a8..646cab8200 100644 --- a/core/src/apps/webauthn/__init__.py +++ b/core/src/apps/webauthn/__init__.py @@ -355,12 +355,16 @@ class ConfirmState: return False if utime.ticks_ms() >= self.deadline: if self.workflow is not None: + # We crossed the deadline, kill the running confirmation + # workflow. `self.workflow` is reset in the finally + # handler in `confirm_workflow`. loop.close(self.workflow) return False return True def setup(self, action: int, checksum: bytes, app_id: bytes) -> bool: - if workflow.workflows: + if workflow.tasks or self.workflow: + # If any other workflow is running, we bail out. return False self.action = action