What changed, and why it matters
This is a tiny follow-up patch that changes how error messages from Trezor hardware wallets are displayed in Electrum's setup wizard. It switches from showing a programmer-style representation (repr) to a more readable plain-text message (str). There is no indication this fixes a security vulnerability; it is a user-experience cleanup.
No security action required. Treat as a routine user-interface polish commit during review.
Security signals we found
No security-relevant code paths modified
No input validation, authentication, or cryptographic changes
No memory-safety, privilege, or authorization changes
Commit title and message are purely functional ('fixup! trezor: support Safe 7')
No CVE, advisory, or security disclosure references present
Evidence from the diff
In electrum/plugins/trezor/qt.py, two exception handlers in the Trezor wallet wizard components (WCTrezorInit and WCTrezorPair) now assign self.error = str(e) instead of self.error = repr(e). The logger.exception call still uses repr(e). This only affects the string shown to the user in the GUI and does not alter control flow, exception handling, cryptography, or device communication.
Changed components
electrum/plugins/trezor/qt.pyTrezor hardware wallet setup wizard GUIInspect captured patch +2 / −2
diff --git a/electrum/plugins/trezor/qt.py b/electrum/plugins/trezor/qt.py
index 1d79c61..93ffb94 100644
--- a/electrum/plugins/trezor/qt.py
+++ b/electrum/plugins/trezor/qt.py
@@ -910,7 +910,7 @@ class WCTrezorInit(WalletWizardComponent, Logger):
self.wizard.requestNext.emit() # triggers Next GUI thread from event loop
except Exception as e:
self.valid = False
- self.error = repr(e)
+ self.error = str(e)
self.logger.exception(repr(e))
finally:
self.busy = False
@@ -954,7 +954,7 @@ class WCTrezorPair(WalletWizardComponent, Logger):
self.wizard_data['trezor_initialized'] = client.features.initialized
self.wizard.requestNext.emit() # triggers Next GUI thread from event loop
except Exception as e:
- self.error = repr(e) # TODO: handle user interaction exceptions (e.g. invalid pin) more gracefully
+ self.error = str(e) # TODO: handle user interaction exceptions (e.g. invalid pin) more gracefully
self.logger.exception(repr(e))
finally:
self.busy = False
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.