From 82ce6e7327ec70cf10b43e1d5b5577ae85d9f2ed Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 31 May 2026 13:20:48 +0800 Subject: [PATCH] fix(crypt): avoid plain Signed-off-by: fufesou --- src/config.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/config.rs b/src/config.rs index 0463046ad..8b8023b61 100644 --- a/src/config.rs +++ b/src/config.rs @@ -722,14 +722,8 @@ impl Config { && decode_permanent_password_h1_from_storage(&config.password).is_none() { let stored = Config::load_::(""); - if stored.password == config.password { - config.password = stored.password; - } else { - config.password = keep_encrypted_storage_if_plaintext_unchanged( - &config.password, - &stored.password, - ); - } + config.password = + keep_encrypted_storage_if_plaintext_unchanged(&config.password, &stored.password); } let (stored_id, encrypted, _) = decrypt_str_or_original(&config.enc_id, PASSWORD_ENC_VERSION);