preset password warning

This commit is contained in:
rustdesk
2024-03-16 11:52:30 +08:00
parent ccf5b0ef53
commit fe0de47805
5 changed files with 59 additions and 1 deletions

View File

@@ -954,6 +954,14 @@ impl Config {
}
pub fn set_permanent_password(password: &str) {
if HARD_SETTINGS
.read()
.unwrap()
.get("password")
.map_or(false, |v| v == password)
{
return;
}
let mut config = CONFIG.write().unwrap();
if password == config.password {
return;