From 1595a64c6156613f542169a9e575ec8f2f6dd60c Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 2 Jan 2019 21:11:21 +0700 Subject: [PATCH] =?UTF-8?q?=D0=95=D1=89=D0=B5=20=D0=BE=D0=B4=D0=B8=D0=BD?= =?UTF-8?q?=20readString(0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/ru/gravit/launchserver/response/auth/AuthResponse.java | 2 +- .../main/java/ru/gravit/launcher/serialize/SerializeLimits.java | 2 ++ modules | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/AuthResponse.java b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/AuthResponse.java index 4bbf84e9..756751ce 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/response/auth/AuthResponse.java @@ -61,7 +61,7 @@ public void reply() throws Exception { if (isClient) client = input.readString(SerializeLimits.MAX_CLIENT); int auth_id = input.readInt(); - String hwid_str = input.readString(0); + String hwid_str = input.readString(SerializeLimits.MAX_HWID_STR); if (auth_id + 1 > server.config.authProvider.length || auth_id < 0) auth_id = 0; byte[] encryptedPassword = input.readByteArray(SecurityHelper.CRYPTO_MAX_LENGTH); // Decrypt password diff --git a/libLauncher/src/main/java/ru/gravit/launcher/serialize/SerializeLimits.java b/libLauncher/src/main/java/ru/gravit/launcher/serialize/SerializeLimits.java index 77c05fa1..d11f3a3f 100644 --- a/libLauncher/src/main/java/ru/gravit/launcher/serialize/SerializeLimits.java +++ b/libLauncher/src/main/java/ru/gravit/launcher/serialize/SerializeLimits.java @@ -17,4 +17,6 @@ public class SerializeLimits { public static final byte EXPECTED_BYTE = 0b01010101; @LauncherAPI public static final int MAX_DIGEST = 512; + @LauncherAPI + public static final int MAX_HWID_STR = 1024; } diff --git a/modules b/modules index 2a09f7b1..ed991077 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 2a09f7b18dde4ea6841e6a141e7cfea8f93d3b29 +Subproject commit ed991077019e49d7a91f313e3bc9360bb6036baa