Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In Monero Tech Meeting 116 (log) I mentioned that changing a password in a password prompt in any way other than appending letters, QT will create copies in memory and we have no easy access to wipe those copies. So I added a property
bool isSecretto theLineEdit.qmlcomponent that you can set totruefor password fields. With that setting, it does not allow Backspace, Delete or Arrow keys or selecting Text with the mouse.If anyone thinks it's worth it, I could investigate if we can make this an optional wallet setting, for those who prefer the old UX. In that case I'd like to know your opinion which option should be default.
Another note from that meeting:
Some things changed for "Settings->Info-Wallet restore height"
setPassword(), which used the cached password before.<wallet_name>to<wallet_name>.old_cache. So if you do something that needs the wallet cache file afterwards it can lead to undefined behavior. E.g. if you try to change your password, you'll get:Error: boost::filesystem::canonical: No such file or directory [generic:2]: "/path/to/Monero/wallets/<wallet_name>/<wallet_name>". Now with a call tostoreAsync()inmain.qmlcallbackconnectWallet()we can prevent this.If you create a view-only wallet with
Settings->Wallet->Create a view-only wallet, you now have to type a new password. Before, it used the cached password so both the original wallet and the new view-only wallet had the same password. A minor problem: without creating a new "new password dialog" there is no confirm-password field, so if you mistyped the desired password you can't open the view-only wallet, but I think it's not a big problem, you can just create new view-only wallets until you get the password right.To test this you need to pull this PR into
monero/subdir.In order to
make debugI changedorigin/masterto<YOUR_LOCAL_BRANCH_NAME>inCMakeLists.txt.