mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-05-25 17:19:15 +00:00
fix(password): remove unnecessary check
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -1276,17 +1276,6 @@ impl Config {
|
|||||||
salt: &str,
|
salt: &str,
|
||||||
) -> crate::ResultType<bool> {
|
) -> crate::ResultType<bool> {
|
||||||
let mut config = CONFIG.write().unwrap();
|
let mut config = CONFIG.write().unwrap();
|
||||||
|
|
||||||
if storage.is_empty() {
|
|
||||||
if config.password.is_empty() {
|
|
||||||
return Ok(false);
|
|
||||||
}
|
|
||||||
config.password = String::new();
|
|
||||||
config.store();
|
|
||||||
Self::clear_trusted_devices();
|
|
||||||
return Ok(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if config.password == storage && config.salt == salt {
|
if config.password == storage && config.salt == salt {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user