mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Remove digest check
This commit is contained in:
parent
540ad0b0da
commit
d4eabbc4c0
2 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -119,7 +119,13 @@ private static JavaVersion tryFindJavaByPath(Path path) {
|
|||
|
||||
public static void tryAddJava(List<String> javaPaths, List<JavaVersion> 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);
|
||||
|
|
Loading…
Reference in a new issue