This commit is contained in:
rustdesk
2022-12-28 13:52:13 +08:00
parent 75f57cf0fc
commit 08b8f40397
10 changed files with 167 additions and 208 deletions

View File

@@ -1148,7 +1148,7 @@ impl Connection {
}
_ => {}
}
if !crate::is_ip(&lr.username) && lr.username != Config::get_id() {
if !hbb_common::is_ipv4_str(&lr.username) && lr.username != Config::get_id() {
self.send_login_error("Offline").await;
} else if password::approve_mode() == ApproveMode::Click
|| password::approve_mode() == ApproveMode::Both && !password::has_valid_password()