mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Enforce the protocol doesn't change after the handshake
This commit is contained in:
@@ -248,6 +248,10 @@ public class LanLinkProvider extends BaseLinkProvider {
|
||||
if (!DeviceInfo.isValidIdentityPacket(secureIdentityPacket)) {
|
||||
throw new JSONException("Invalid identity packet");
|
||||
}
|
||||
if (secureIdentityPacket.getInt("protocolVersion") != protocolVersion) {
|
||||
Log.e("KDE/LanLinkProvider", "Protocol version changed half-way through the handshake");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
secureIdentityPacket = identityPacket;
|
||||
}
|
||||
|
Reference in New Issue
Block a user