mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Apply password during onboarding and prompt for password when needed #548
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!548
Loading…
Reference in a new issue
No description provided.
Delete branch "wallet-password"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #517
Cleaned up the commits and added unittest coverage
07e88a8ea3046df58f6bb2a5dc3c2cfeb9769dc4
at migration, the dialog always shows up with error
https://github.com/user-attachments/assets/75b5f683-13f5-4e70-bc0e-9ec3e61ee96a
Removed the error message from showing on the first prompt
fa672368c4b3595b64da8b4b2e129af861d1908e
The password prompt does not show up on the send flow. Just throws an error.
In an attempt to improve on the signing flow I made the process too fragile. I have reverted back to a simpler design that aligns with the current Qt widgets flow. It should now correctly prompt and sign before moving to the review page. Then the review page will broadcast that prepared transaction when send is pressed.
I realized that PR for RBF got merged before this. I had left a
//FIXME: Unlock wallet before confirming (PR #548)inSpeedUpOverlay.qml.Do you want to implement that as part of this PR or I can track that separately.
Otherwise ACK 3135d62703cc4df8714dcf07bd1182852d7523df

Does this impact any functional test?
qml_test_send_receive.py:304uses it.yes, need to fix and also make sure all of the functional tests are running in CI
good point. I added a new issue to track this as this PR has become too large already (#692)
updated the selectors and added all of the functional tests into the workflow so they should run and catch any remaining issues.
It seems like what we are currently doing now is determining that it needs a passphrase by first attempting without a passphrase, getting an error, then using that to learn that this wallet will need a passphrase
But, we should be using the
isEncryptedcall from the wallet to determine if the wallet migration will need a passphraseThe following diff should express what I mean:
yes, we need that
instead of the manual relocks everywhere, we should RAII this?
like so for example:
We need to be more secure about the lifetime of the passphrase and how we treat it.
This is worth tightening as a security fix. The passphrase popup currently emits
passphraseField.textdirectly and leaves the hiddenCoreTextFieldpopulated until the popup is reopened or destroyed. That means the passphrase remains in memory after migration completed.We should treat it as sensitive information and use
SecureString, then overwrite and clear the UI immediately, and also clear again on close for redundancy.Here is a diff that should accomplish this (without tests)
included your suggestions and added qml, cpp, and functional tests to validate
Was it intentional to remove this?
yes, duplicate entry. already exists in line 19
I noticed this - if you have multiple recipients and have the fields empty in the second one, we still enable the "Review" button. It prompts for passphrase and then nothing happens.
https://github.com/user-attachments/assets/b66dd1ee-545d-4d17-9d42-d81b716f2b3a
We should probably not enable the "Review" button in this case? Can we tracked outside of this PR.
yes lets track this as a multi recipients bug
Edit: tracking with #705
ACK
ed41f5b91e