From ebf41b8524d06ac31870c4976e1044dd5e877416 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 22 Mar 2026 19:11:26 +0800 Subject: [PATCH] fix(password): remove unnecessary check Signed-off-by: fufesou --- src/config.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/config.rs b/src/config.rs index 86799d164..09c91d833 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1271,8 +1271,6 @@ impl Config { } /// Persist permanent password storage and salt from service->user config sync. - /// - /// This never accepts plaintext. `storage` must be empty or a valid hashed verifier storage. pub fn set_permanent_password_storage_for_sync( storage: &str, salt: &str, @@ -1289,15 +1287,6 @@ impl Config { return Ok(true); } - if salt.is_empty() { - return Err(anyhow!( - "Refusing to persist hashed permanent password without salt" - )); - } - if decode_permanent_password_h1_from_storage(storage).is_none() { - return Err(anyhow!("Invalid hashed permanent password storage")); - } - if config.password == storage && config.salt == salt { return Ok(false); }