Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet: Support not encrypted wallets (#115) #121

Merged
merged 1 commit into from
Mar 18, 2022

Conversation

alvasw
Copy link
Contributor

@alvasw alvasw commented Mar 18, 2022

At the moment, the wallet module raises a NullPointerException if the
wallet is not encrypted. This shouldn't happen.

At the moment, the wallet module raises a NullPointerException if the
wallet is not encrypted. This shouldn't happen.
Copy link
Contributor

@chimp1984 chimp1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

String passphrase = model.walletPassphraseProperty.get();
String passphraseValue = model.walletPassphraseProperty.get();
Optional<String> passphrase = passphraseValue.isEmpty() ? Optional.empty()
: Optional.of(passphraseValue);
model.walletPassphraseProperty.setValue(""); // Wipe passphrase from memory
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually to avoid that the passphrase sticks in memory (until GC cleans up) we should use a char array instead of a String and clear the array afterwards. But no need to do it now, just for hardening once we get more production ready.

@chimp1984 chimp1984 merged commit be87275 into bisq-network:main Mar 18, 2022
@alvasw alvasw deleted the wallet_allow_empty_passphrase branch April 8, 2022 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants