mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-17 18:01:06 +03:00
fix: check switch-side ID whitelist after login initialization
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -2846,11 +2846,6 @@ impl Connection {
|
|||||||
#[cfg(feature = "flutter")]
|
#[cfg(feature = "flutter")]
|
||||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||||
if let Some(lr) = _s.lr.clone().take() {
|
if let Some(lr) = _s.lr.clone().take() {
|
||||||
// Switching sides authorizes without a password, so it must not bypass the
|
|
||||||
// whitelist, which can be a locked policy pushed by the server.
|
|
||||||
if !self.check_id_whitelist().await {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
SWITCH_SIDES_UUID
|
SWITCH_SIDES_UUID
|
||||||
.lock()
|
.lock()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
@@ -2868,6 +2863,11 @@ impl Connection {
|
|||||||
}
|
}
|
||||||
self.reset_session_scope_for_login();
|
self.reset_session_scope_for_login();
|
||||||
self.handle_login_request_without_validation(&lr).await;
|
self.handle_login_request_without_validation(&lr).await;
|
||||||
|
// Switching sides authorizes without a password, so it must not bypass
|
||||||
|
// the whitelist, which can be a locked policy pushed by the server.
|
||||||
|
if !self.check_id_whitelist().await {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
self.from_switch = true;
|
self.from_switch = true;
|
||||||
self.set_conn_audit_primary_auth(ConnAuditPrimaryAuth::SwitchSides);
|
self.set_conn_audit_primary_auth(ConnAuditPrimaryAuth::SwitchSides);
|
||||||
if !self.send_logon_response_and_keep_alive().await {
|
if !self.send_logon_response_and_keep_alive().await {
|
||||||
|
|||||||
Reference in New Issue
Block a user