fix(password): get_salt() always return value

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2026-03-22 20:25:26 +08:00
parent 01b192c068
commit 6fcda1dcc4

View File

@@ -1356,8 +1356,7 @@ impl Config {
// should be automatically generated when migrating to hash storage. // should be automatically generated when migrating to hash storage.
// However, if it does occur, it's best to log the error, // However, if it does occur, it's best to log the error,
// even though this will result in logging many duplicate error messages. // even though this will result in logging many duplicate error messages.
log::error!("Salt is empty but permanent password is hashed"); log::warn!("Salt is empty but permanent password is hashed");
return String::new();
} }
drop(config); drop(config);
salt = Config::get_auto_password(DEFAULT_SALT_LEN); salt = Config::get_auto_password(DEFAULT_SALT_LEN);