AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 17 Bitcoin

plugin: trezor: handle empty passphrase feature in settings dialog

Public commit record

What the developer wrote

Authored by f321x

85/100 · Strong
plugin: trezor: handle empty passphrase feature in settings dialog

The settings dialog would raise after disabling the passphrase because
the feature is None after disconnecting:

```
24.43 | I | plugins.trezor.clientbase.TrezorClientBase | locking: <trezorlib.protocol_v1.TrezorClientV1 object at 0x7fec5f7d45e0>
24.82 | I | plugins.trezor.clientbase.TrezorClientBase | closing: SessionV1(id=fec9fa77e94f52faa50e3aa5573d6e760a028e2e6cd2366bc998dcc9870f2382)
24.97 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
File "/var/home/user/code/code_vm/electrum-3/electrum/gui/common_qt/util.py", line 175, in on_done
cb_result(result)
~~~~~~~~~^^^^^^^^
File "/var/home/user/code/code_vm/electrum-3/electrum/plugins/trezor/qt.py", line 534, in update
passphrases_label.setText(disen[features.passphrase_protection])
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not NoneType
```
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a crash in Electrum's settings window for Trezor hardware wallets. After a user disabled the passphrase feature and disconnected the device, the settings dialog tried to read a value that had become 'None', causing a TypeError and crashing the dialog. The patch stores the device features before disconnecting and gracefully handles the 'None' case by showing 'Unknown' instead of crashing.

Recommended action

No security action required; treat as a normal bugfix. Users may update to a version containing this commit if they experienced the settings dialog crash.

Security signals we found

01

UI crash / unhandled exception in hardware wallet plugin settings dialog

02

None-value dereference (TypeError) in list indexing

03

No evidence of malicious control flow, privilege escalation, or data exposure

Risk score

Why this scored 17/100

Our methodology →
Potential impact 2/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 3/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.