diff --git a/server/index.ts b/server/index.ts index 928a000..cbc79fb 100644 --- a/server/index.ts +++ b/server/index.ts @@ -413,19 +413,17 @@ websocketServer.on("connection", (socket) => { const reader = createReader(Endian.LE, data as Buffer); // There is absolutely no reason we should ever get // more than 50 bytes legit. - if (reader.length > 0 && reader.length < 50) { - switch (reader.readUByte()) { + if (reader.length > 0 && reader.length < 1024) { + switch (reader.readByte()) { case MessageType.ClientDetails: { if (user !== undefined) { - Console.printInfo("Tried to ClientDetails when already connected and ready!"); return; } const apiKey = reader.readShortString(); const rawURL = reader.readString(); const dbUser = await UserService.GetUserByAPIKey(apiKey); if (dbUser == null) { - Console.printInfo("User for apiKey " + apiKey + " was null!"); return; } const dbUserParty = await UserService.GetActiveParty(dbUser.Id);