rustdesk 2025-11-03 13:03:19 +08:00
parent c8a5d41906
commit 4e8d6d08e2
2 changed files with 2 additions and 0 deletions

View File

@ -428,6 +428,7 @@ async fn make_pair_(stream: impl StreamTrait, addr: SocketAddr, key: &str, limit
if let Ok(msg_in) = RendezvousMessage::parse_from_bytes(&bytes) {
if let Some(rendezvous_message::Union::RequestRelay(rf)) = msg_in.union {
if !key.is_empty() && rf.licence_key != key {
log::warn!("Relay authentication failed from {} - invalid key", addr);
return;
}
if !rf.uuid.is_empty() {

View File

@ -680,6 +680,7 @@ impl RendezvousServer {
) -> ResultType<(RendezvousMessage, Option<SocketAddr>)> {
let mut ph = ph;
if !key.is_empty() && ph.licence_key != key {
log::warn!("Authentication failed from {} for peer {} - invalid key", addr, ph.id);
let mut msg_out = RendezvousMessage::new();
msg_out.set_punch_hole_response(PunchHoleResponse {
failure: punch_hole_response::Failure::LICENSE_MISMATCH.into(),