From d4eabbc4c0112dc8ce72ea6632cf4fdb73aab347 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 6 May 2023 00:25:48 +0700 Subject: [PATCH 1/7] [FIX] Remove digest check --- .../src/main/java/pro/gravit/launcher/Launcher.java | 4 ---- .../src/main/java/pro/gravit/utils/helper/JavaHelper.java | 8 +++++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java b/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java index 28bb2374..27457da0 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/Launcher.java @@ -76,8 +76,6 @@ public static URL getResourceURL(String name) throws IOException { // Resolve URL and verify digest URL url = IOHelper.getResourceURL(RUNTIME_DIR + '/' + name); - if (!Arrays.equals(validDigest, SecurityHelper.digest(SecurityHelper.DigestAlgorithm.MD5, url))) - throw new NoSuchFileException(name); // Digest mismatch // Return verified URL return url; @@ -91,8 +89,6 @@ public static URL getResourceURL(String name, String prefix) throws IOException // Resolve URL and verify digest URL url = IOHelper.getResourceURL(prefix + '/' + name); - if (!Arrays.equals(validDigest, SecurityHelper.digest(SecurityHelper.DigestAlgorithm.MD5, url))) - throw new NoSuchFileException(name); // Digest mismatch // Return verified URL return url; diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java index 8c52aa53..6a9ec45d 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/JavaHelper.java @@ -119,7 +119,13 @@ private static JavaVersion tryFindJavaByPath(Path path) { public static void tryAddJava(List javaPaths, List result, JavaVersion version) { if (version == null) return; - String path = version.jvmDir.toAbsolutePath().toString(); + Path realPath = version.jvmDir.toAbsolutePath(); + try { + realPath = realPath.toRealPath(); + } catch (IOException ignored) { + + } + String path = realPath.toString(); if (javaPaths.contains(path)) return; javaPaths.add(path); result.add(version); From 907e7cc47ee458e593ad6937b60c72b06e8ae3b3 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 7 May 2023 00:10:23 +0700 Subject: [PATCH 2/7] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index fc263e19..1cb71a13 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit fc263e19bc73cc7cb0f64c4e78c092c363b6769a +Subproject commit 1cb71a1390fdc030fe59dc992e0212b91f030225 From 498325f3e87d08251c85c84737de3b811465c100 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 8 May 2023 00:42:00 +0700 Subject: [PATCH 3/7] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 1cb71a13..967d6efc 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 1cb71a1390fdc030fe59dc992e0212b91f030225 +Subproject commit 967d6efcaab2d37803cb4e9052d34f7a1cd27497 From ae426b2fd072a441edd5156cecc8c1fa00bc389c Mon Sep 17 00:00:00 2001 From: microwin7 Date: Sat, 13 May 2023 11:49:30 +0300 Subject: [PATCH 4/7] [FIX] Incorrect send AuthException for User not found (#651) --- .../gravit/launchserver/auth/core/AbstractSQLCoreProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java index 1336c331..ccd20378 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/core/AbstractSQLCoreProvider.java @@ -136,7 +136,7 @@ public AuthManager.AuthReport refreshAccessToken(String refreshToken, AuthRespon public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext context, AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException { SQLUser SQLUser = (SQLUser) getUserByLogin(login); if (SQLUser == null) { - throw AuthException.wrongPassword(); + throw AuthException.userNotFound(); } if (context != null) { AuthPlainPassword plainPassword = (AuthPlainPassword) password; From d9be4bb577b1930c9f4bff5efb43252ba0d6dbaa Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 15 May 2023 13:22:08 +0700 Subject: [PATCH 5/7] [FEATURE] Support LauncherAuthlib4 --- .../java/pro/gravit/launcher/profiles/ClientProfileVersions.java | 1 + 1 file changed, 1 insertion(+) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java index 0af1185c..ef038715 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfileVersions.java @@ -15,4 +15,5 @@ private ClientProfileVersions() { public static final ClientProfile.Version MINECRAFT_1_17 = ClientProfile.Version.of("1.17"); public static final ClientProfile.Version MINECRAFT_1_18 = ClientProfile.Version.of("1.18"); public static final ClientProfile.Version MINECRAFT_1_19 = ClientProfile.Version.of("1.19"); + public static final ClientProfile.Version MINECRAFT_1_20 = ClientProfile.Version.of("1.20"); } From 4a538cde6190a26cfc9437b1542c2671c4e8f74e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 15 May 2023 13:22:28 +0700 Subject: [PATCH 6/7] [ANY] Update modules --- modules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules b/modules index 967d6efc..bade21a2 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 967d6efcaab2d37803cb4e9052d34f7a1cd27497 +Subproject commit bade21a21b1fb9525c017b9f27a80a2276ff95e3 From 9b2c98e10be88e427c2697fbdc1c1c0502635a45 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sat, 20 May 2023 13:48:29 +0700 Subject: [PATCH 7/7] [ANY] 5.4.2 stable --- LauncherCore/src/main/java/pro/gravit/utils/Version.java | 2 +- build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LauncherCore/src/main/java/pro/gravit/utils/Version.java b/LauncherCore/src/main/java/pro/gravit/utils/Version.java index f1b83844..7c694318 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/Version.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/Version.java @@ -6,7 +6,7 @@ public final class Version implements Comparable { public static final int MAJOR = 5; public static final int MINOR = 4; - public static final int PATCH = 1; + public static final int PATCH = 2; public static final int BUILD = 1; public static final Version.Type RELEASE = Type.STABLE; public final int major; diff --git a/build.gradle b/build.gradle index adcbb69a..4ec0d34b 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ id 'org.openjfx.javafxplugin' version '0.0.10' apply false } group = 'pro.gravit.launcher' -version = '5.4.1' +version = '5.4.2' apply from: 'props.gradle'