Wallet password prompt: after "show password" is used once, every later opening starts in clear text #1133

Open
opened 2026-11-13 15:16:59 +00:00 by jarolrod · 0 comments
jarolrod commented 2026-11-13 15:16:59 +00:00 (Migrated from github.com)

A wallet password prompt whose eye icon has been used once stays unmasked: at every later opening the passphrase is drawn in clear text as it is typed, until the page that owns the prompt is left or the app is restarted. The Update password page keeps its reveal the same way across a tab change.

To reproduce:

  1. Encrypted wallet. Settings → Wallet settings → Sign message, enter a legacy address and a message, Sign message. The prompt opens masked.
  2. Reveal the passphrase with the eye icon at the right end of the field (see the limits below).
  3. Cancel, then Sign message again, and type abc.

The field shows abc, with the crossed-eye icon, before the eye is touched.

After the reveal, the Sign message prompt is opened again Field
after a wrong password and Cancel clear text
after a successful unlock and a relock clear text
after a visit to Activity and back clear text
after a switch to another wallet and back clear text
after Back out of Sign message, or a restart masked
eye never used; another wallet's prompt masked

The Send review prompt did the same. On Update password, after Show password on the current-password field and a visit to Activity, the same page comes back with its fields emptied and still unmasked: xyz typed is drawn in clear. It is masked again after Back.

The masking is one property of the prompt's field, and a tap on the icon overwrites it:

github.com/bitcoin-core/gui-qml@2bd5a61e83/qml/controls/CoreTextField.qml (L43-L47)

The prompt wipes only the text when it opens, hides and closes, and nothing sets the mode back:

github.com/bitcoin-core/gui-qml@2bd5a61e83/qml/components/WalletPassphrasePopup.qml (L76-L95)

Each of the app's six prompts is one object that lives as long as its page, which for the Send review and Receive prompts is as long as the wallet stays open, by the source. The icon shows the state and one click masks the field again. Bitcoin-Qt, by its source, builds a new dialog for every prompt with "Show passphrase" off.

Setting the mode back where the text is already wiped would do it. Is keeping the reveal on Update password across a tab change intended? #1052 at e89a2bcd4624 and #1060 at 733018ca9eab move the prompt to the field that page uses and, by their diffs, still clear only the text.

Reproduced on qt6 at 2bd5a61e8304, macOS arm64 / Qt 6.9.0, isolated regtest, offscreen and native; the same offscreen at eed1f426fcb6. Limits:

  • I have not clicked a prompt's eye icon in the app. The test bridge cannot reach it, so in every run the prompt's field was switched to clear text by writing its echo-mode property. That a click does the same rests on the source and on a small Qt 6.9.0 program built from copies of the same two components, where a pointer click revealed the text, the state survived Cancel and a reopening, and a second click masked it.
  • On Update password the reveal was the eye button's own click, sent through the test bridge, not a pointer click.
  • The Send review prompt was run offscreen only. The Receive prompt could not be switched and was only seen masked. The other three prompts were not run.
A wallet password prompt whose eye icon has been used once stays unmasked: at every later opening the passphrase is drawn in clear text as it is typed, until the page that owns the prompt is left or the app is restarted. The **Update password** page keeps its reveal the same way across a tab change. To reproduce: 1. Encrypted wallet. **Settings → Wallet settings → Sign message**, enter a legacy address and a message, **Sign message**. The prompt opens masked. 2. Reveal the passphrase with the eye icon at the right end of the field (see the limits below). 3. **Cancel**, then **Sign message** again, and type `abc`. The field shows `abc`, with the crossed-eye icon, before the eye is touched. | After the reveal, the Sign message prompt is opened again | Field | |---|---| | after a wrong password and **Cancel** | clear text | | after a successful unlock and a relock | clear text | | after a visit to **Activity** and back | clear text | | after a switch to another wallet and back | clear text | | after **Back** out of Sign message, or a restart | masked | | eye never used; another wallet's prompt | masked | The Send review prompt did the same. On **Update password**, after **Show password** on the current-password field and a visit to **Activity**, the same page comes back with its fields emptied and still unmasked: `xyz` typed is drawn in clear. It is masked again after **Back**. The masking is one property of the prompt's field, and a tap on the icon overwrites it: https://github.com/bitcoin-core/gui-qml/blob/2bd5a61e8304d5143e32f1ce977a2de2aceb6413/qml/controls/CoreTextField.qml#L43-L47 The prompt wipes only the text when it opens, hides and closes, and nothing sets the mode back: https://github.com/bitcoin-core/gui-qml/blob/2bd5a61e8304d5143e32f1ce977a2de2aceb6413/qml/components/WalletPassphrasePopup.qml#L76-L95 Each of the app's six prompts is one object that lives as long as its page, which for the Send review and Receive prompts is as long as the wallet stays open, by the source. The icon shows the state and one click masks the field again. Bitcoin-Qt, by its source, builds a new dialog for every prompt with "Show passphrase" off. Setting the mode back where the text is already wiped would do it. Is keeping the reveal on **Update password** across a tab change intended? #1052 at `e89a2bcd4624` and #1060 at `733018ca9eab` move the prompt to the field that page uses and, by their diffs, still clear only the text. Reproduced on `qt6` at `2bd5a61e8304`, macOS arm64 / Qt 6.9.0, isolated regtest, offscreen and native; the same offscreen at `eed1f426fcb6`. Limits: - I have not clicked a prompt's eye icon in the app. The test bridge cannot reach it, so in every run the prompt's field was switched to clear text by writing its echo-mode property. That a click does the same rests on the source and on a small Qt 6.9.0 program built from copies of the same two components, where a pointer click revealed the text, the state survived Cancel and a reopening, and a second click masked it. - On **Update password** the reveal was the eye button's own click, sent through the test bridge, not a pointer click. - The Send review prompt was run offscreen only. The Receive prompt could not be switched and was only seen masked. The other three prompts were not run.
Sign in to join this conversation.
No description provided.