Skip to content

Conversation

@Lapo4kaKek
Copy link

In liteclient, the TCP authentication packet tcp.authentificationComplete was encoded incorrectly. The code wrote magicTcpAuthentificationComplete into a 4-byte buffer and then overwrote those same 4 bytes with magicPubKey, so the packet started with pub.ed25519 instead of tcp.authentificationComplete. As a result, the server couldn’t parse the message and TCP auth failed.

Fix

Build the payload as a proper TL sequence:

magicTcpAuthentificationComplete

magicPubKey

ed25519 public key

TL-encoded signature
After that the packet is wrapped and sent. Now TCP authentification works correctly and matches the C++ implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant