From a2619a8d72601062f48898ce587b31ccbc19de96 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 19 Jul 2022 12:29:43 +0100 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20show=20default=20random=20passw?= =?UTF-8?q?ord=20in=20command-line=20help?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cli/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cli/mod.rs b/src/cli/mod.rs index d7e70d2b..34e94e32 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -30,7 +30,7 @@ We would love it if you could star the repository (https://github.com/surrealdb/ "; static PASS: Lazy = Lazy::new(|| { - rand::thread_rng().sample_iter(&Alphanumeric).take(128).map(char::from).collect::() + rand::thread_rng().sample_iter(&Alphanumeric).take(16).map(char::from).collect::() }); fn file_valid(v: &str) -> Result<(), String> { @@ -165,6 +165,7 @@ pub fn init() { Arg::new("pass") .short('p') .long("pass") + .hide_default_value(true) .forbid_empty_values(true) .default_value(PASS.as_str()) .help("The master password for the database"),