Skip to content
Permalink
Browse files Browse the repository at this point in the history
Limit the ports we try to connect to to the port range of KDE Connect
So we can't trigger connections to other services.

Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
  • Loading branch information
albertvaka committed Oct 2, 2020
1 parent 613899b commit ce0f00f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/backends/lan/lanlinkprovider.cpp
Expand Up @@ -241,6 +241,11 @@ void LanLinkProvider::udpBroadcastReceived()
}

int tcpPort = receivedPacket->get<int>(QStringLiteral("tcpPort"));
if (tcpPort < MIN_TCP_PORT || tcpPort > MAX_TCP_PORT) {
qCDebug(KDECONNECT_CORE) << "TCP port outside of kdeconnect's range";
delete receivedPacket;
continue;
}

//qCDebug(KDECONNECT_CORE) << "Received Udp identity packet from" << sender << " asking for a tcp connection on port " << tcpPort;

Expand Down

0 comments on commit ce0f00f

Please sign in to comment.