From bbac20b4537f28aecdfef2ad3e119a32bda04c38 Mon Sep 17 00:00:00 2001 From: scgbckbone Date: Tue, 24 Jun 2025 10:23:30 +0200 Subject: [PATCH] bugfix: premature wipe while exporting secret material via NFC - only first export loop (0th) was actually sending data --- releases/Next-ChangeLog.md | 1 + shared/nfc.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/releases/Next-ChangeLog.md b/releases/Next-ChangeLog.md index 9077e13f..1227c421 100644 --- a/releases/Next-ChangeLog.md +++ b/releases/Next-ChangeLog.md @@ -12,6 +12,7 @@ This lists the new changes that have not yet been published in a normal release. - Bugfix: Disallow negative input/output amounts in PSBT. - Bugfix: Fix filesystem initialization after Wife LFS or Destroy Seed. - Bugfix: Fix MicroSD selftest +- Bugfix: NFC loop exporting secrets pre-mature wipe ## Spending Policy Feature diff --git a/shared/nfc.py b/shared/nfc.py index cd6fe40e..aff644a1 100644 --- a/shared/nfc.py +++ b/shared/nfc.py @@ -402,7 +402,7 @@ class NFCHandler: # Run the pretty animation, and detect both when we are written, and/or key to exit/abort. # - similar when "read" and then removed from field # - return T if aborted by user - from glob import dis, numpad + from glob import dis await self.wait_ready() self.set_rf_disable(0) @@ -471,7 +471,8 @@ class NFCHandler: break self.set_rf_disable(1) - if not write_mode: + # do not wipe if we are not aborted + if not write_mode and aborted: # function argument secret decides whether to do full wipe after writing to chip await self.wipe(is_secret)