Commit Message: Check that protocol version and deviceId match on encrypted identity File Changed: src/service/backends/lan.js Key Information About Vulnerability: Protocol Version Check: - Introduced a check to ensure the matches between the device's and the expected . - If they do not match, an is thrown indicating an "Unexpected protocol version" and the handshake details. Device ID Check: - Added a condition to verify if the matches. If not, it throws an error for an "Unexpected device ID" and logs the handshake details. - Rejected connections for mismatches to prevent potential identity spoofing or protocol version-related attacks. TLS Negotiation: - For protocol versions >= 8, devices are expected to exchange identity packets again after TLS negotiation to ensure secure and valid identity exchange. Error Handling: - Added robust error handling in identity verification. If mismatches or unexpected values occur, the connection is closed promptly. Summary: The changes address potential vulnerabilities related to protocol version and device identity mismatches, enhancing security by validating identities accurately, throwing specific errors for mismatches, and closing undesired connections.