When using the RPC command encryptwallet
in the CLI, the password used to encrypt it has to be entered as an argument and thus can be retrieved with reverse-search for “encryptwallet”.
I thought that the password for encryptwallet
(as well as for walletpassphrase
) should be asked interactively.
I wanted to submit a PR to change CommandLineRPC
(https://github.com/bitcoin/bitcoin/blob/b8b0b8ced7fa918ae00b697e5696b1950dfb714c/src/bitcoin-cli.cpp#L444
) so that if encryptwallet
or áºalletpassphrasecommand is passed to
bitcoin-cli`, it asks interactively for the password, is it the right way to do it ? Is there any reason why passwords are passed in clear in the CLI ?