fix(handshake): send UniqueID (machine fingerprint) before the SSO ticket

Arcturus' Habbo.connect() runs when the SSOTicket packet is handled and needs the machineId, which is set by the UniqueID packet. Sending the SSO ticket first made such servers reject the login (WS closed with "Bye") because the fingerprint hadn't arrived yet. Send UniqueID before the SSO ticket so the machineId is available when the server processes the login.
This commit is contained in:
simoleo89
2026-06-09 20:53:48 +02:00
parent fa0cb9b4b1
commit a2064e2901
@@ -45,8 +45,10 @@ export class CommunicationManager implements ICommunicationManager
const machineId = await this._machineIdPromise;
this._connection.send(new ClientHelloMessageComposer(null, null, null, null));
this._connection.send(new SSOTicketMessageComposer(GetConfiguration().getValue('sso.ticket', null), GetTickerTime()));
// Send the machine fingerprint (UniqueID) BEFORE the SSO ticket so the server
// has the machineId available when it processes the login in Habbo.connect().
this._connection.send(new UniqueIDMessageComposer(machineId, '', ''));
this._connection.send(new SSOTicketMessageComposer(GetConfiguration().getValue('sso.ticket', null), GetTickerTime()));
}
constructor()