mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
Merge branch 'release/5.4.2'
This commit is contained in:
commit
0c23b59749
7 changed files with 12 additions and 9 deletions
|
@ -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 {
|
public AuthManager.AuthReport authorize(String login, AuthResponse.AuthContext context, AuthRequest.AuthPasswordInterface password, boolean minecraftAccess) throws IOException {
|
||||||
SQLUser SQLUser = (SQLUser) getUserByLogin(login);
|
SQLUser SQLUser = (SQLUser) getUserByLogin(login);
|
||||||
if (SQLUser == null) {
|
if (SQLUser == null) {
|
||||||
throw AuthException.wrongPassword();
|
throw AuthException.userNotFound();
|
||||||
}
|
}
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
AuthPlainPassword plainPassword = (AuthPlainPassword) password;
|
AuthPlainPassword plainPassword = (AuthPlainPassword) password;
|
||||||
|
|
|
@ -76,8 +76,6 @@ public static URL getResourceURL(String name) throws IOException {
|
||||||
|
|
||||||
// Resolve URL and verify digest
|
// Resolve URL and verify digest
|
||||||
URL url = IOHelper.getResourceURL(RUNTIME_DIR + '/' + name);
|
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 verified URL
|
||||||
return url;
|
return url;
|
||||||
|
@ -91,8 +89,6 @@ public static URL getResourceURL(String name, String prefix) throws IOException
|
||||||
|
|
||||||
// Resolve URL and verify digest
|
// Resolve URL and verify digest
|
||||||
URL url = IOHelper.getResourceURL(prefix + '/' + name);
|
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 verified URL
|
||||||
return url;
|
return url;
|
||||||
|
|
|
@ -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_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_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_19 = ClientProfile.Version.of("1.19");
|
||||||
|
public static final ClientProfile.Version MINECRAFT_1_20 = ClientProfile.Version.of("1.20");
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ public final class Version implements Comparable<Version> {
|
||||||
|
|
||||||
public static final int MAJOR = 5;
|
public static final int MAJOR = 5;
|
||||||
public static final int MINOR = 4;
|
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 int BUILD = 1;
|
||||||
public static final Version.Type RELEASE = Type.STABLE;
|
public static final Version.Type RELEASE = Type.STABLE;
|
||||||
public final int major;
|
public final int major;
|
||||||
|
|
|
@ -119,7 +119,13 @@ private static JavaVersion tryFindJavaByPath(Path path) {
|
||||||
|
|
||||||
public static void tryAddJava(List<String> javaPaths, List<JavaVersion> result, JavaVersion version) {
|
public static void tryAddJava(List<String> javaPaths, List<JavaVersion> result, JavaVersion version) {
|
||||||
if (version == null) return;
|
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;
|
if (javaPaths.contains(path)) return;
|
||||||
javaPaths.add(path);
|
javaPaths.add(path);
|
||||||
result.add(version);
|
result.add(version);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
id 'org.openjfx.javafxplugin' version '0.0.10' apply false
|
id 'org.openjfx.javafxplugin' version '0.0.10' apply false
|
||||||
}
|
}
|
||||||
group = 'pro.gravit.launcher'
|
group = 'pro.gravit.launcher'
|
||||||
version = '5.4.1'
|
version = '5.4.2'
|
||||||
|
|
||||||
apply from: 'props.gradle'
|
apply from: 'props.gradle'
|
||||||
|
|
||||||
|
|
2
modules
2
modules
|
@ -1 +1 @@
|
||||||
Subproject commit fc263e19bc73cc7cb0f64c4e78c092c363b6769a
|
Subproject commit bade21a21b1fb9525c017b9f27a80a2276ff95e3
|
Loading…
Reference in a new issue