From 485e2f7e22b702a8dc7c1fc870f6164cc76f9d69 Mon Sep 17 00:00:00 2001 From: fufesou Date: Mon, 23 Mar 2026 12:18:42 +0800 Subject: [PATCH] fix(password): use password, best effort Signed-off-by: fufesou --- src/config.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.rs b/src/config.rs index 83176e78a..e986c23bc 100644 --- a/src/config.rs +++ b/src/config.rs @@ -670,6 +670,10 @@ impl Config { if config.salt.is_empty() { config.salt = Config::get_auto_password(DEFAULT_SALT_LEN); } + if is_permanent_password_hashed_storage(&plain) { + config.password = plain; + return true; + } let h1 = compute_permanent_password_h1(&plain, &config.salt); config.password = encode_permanent_password_storage_from_h1(&h1); return true;