increase
This commit is contained in:
parent
0c34cd0fab
commit
deb31424e8
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue