From b34f79d4ff4e73ab2574658eedea082573803330 Mon Sep 17 00:00:00 2001 From: Cayle Sharrock Date: Tue, 3 May 2022 15:06:51 +0100 Subject: [PATCH] fix: support safe non-interactive mode (#4072) Non-interactive mode should NEVER prompt the user. This PR clears one path where this happens: If a wallet does not exist and a password has not been provided so that we can auto-create one. In this case, the application should just exit. Providing passwords on the command line is VERY bad practice, since anyone with access to the machine can see the password in plaintext by inspecting the running jobs. The ability to read the password from the commaond-line, OR config file OR envar was removed in a previous PR, and this is rectified here. How Has This Been Tested? --- Manually, with various CLI and envar combinations --- applications/tari_console_wallet/src/init/mod.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/applications/tari_console_wallet/src/init/mod.rs b/applications/tari_console_wallet/src/init/mod.rs index 3ae8aee7ab..dc8c82802d 100644 --- a/applications/tari_console_wallet/src/init/mod.rs +++ b/applications/tari_console_wallet/src/init/mod.rs @@ -555,10 +555,18 @@ pub(crate) fn boot(cli: &Cli, wallet_config: &WalletConfig) -> Result::new();