1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-15 19:08:07 +00:00

core/webauthn: fix bug introduced in bb2556

Fixes #448
This commit is contained in:
Jan Pochyla 2019-08-28 14:27:25 +02:00
parent 9cef06de2b
commit 34ec1ed294

View File

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