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

qt: paytoedit: complete contacts to their key, not 'name <key>'

Public commit record

What the developer wrote

Authored by f321x

73/100 · Adequate
qt: paytoedit: complete contacts to their key, not 'name <key>'

The contact completer lists 'name <key>', and QLineEdit put that text
into the edit when an item was highlighted or chosen. That is not a
payment identifier, so after 1s the edit timer set an invalid one. If
the key of a chosen contact was still being resolved then, the result
was dropped and the spinner never stopped.

Highlighting or choosing a contact now puts its key into the edit.
While the list is open nothing is looked up, so browsing it doesn't
resolve every highlighted contact. The edit is read within 1s after
the list is closed, or right away when a contact is chosen.

When the text is edited, the old payment identifier is dropped until
the new one is set, so Pay, Save and Max are disabled meanwhile.
Before, Pay could pay the previous recipient for up to 1s after a new
one was typed.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's Qt 'Send' tab where selecting a contact from the autocomplete dropdown could briefly leave the wrong recipient active. Previously, the payment field was set to a display name like 'Alice <alice@example.com>' for up to about one second, and during that window the 'Pay' button could still use the previous recipient. The patch makes the field immediately switch to the actual payment identifier (e.g. alice@example.com), pauses lookups while the dropdown is open, and disables Pay/Save/Max while the recipient text is being edited. It also fixes a related UI spinner that could keep spinning forever.

Recommended action

Treat this as a security-relevant bug fix and include it in the next release. Users should upgrade to a version containing this commit to avoid the risk of sending to a stale recipient after changing the pay-to field. No immediate incident response is required beyond normal patch deployment.

Security signals we found

01

UI state desynchronization between displayed recipient and active PaymentIdentifier

02

Stale PaymentIdentifier usable for ~1 second after recipient text changes

03

Pay/Save/Max buttons enabled while recipient is being edited

04

Contact completer inserting non-identifier display text into payment field

05

Race condition between edit timer and contact key resolution

06

Progress spinner not hidden on stale resolve / clear

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 8/15
Confidence 7/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.