mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-07 06:16:42 +02:00
Can now disable the update hash check
This commit is contained in:
@@ -229,6 +229,8 @@ public class UpdateUtils {
|
|||||||
try (FileOutputStream out = new FileOutputStream(updateFileName)) {
|
try (FileOutputStream out = new FileOutputStream(updateFileName)) {
|
||||||
out.write(response.bodyAsBytes());
|
out.write(response.bodyAsBytes());
|
||||||
}
|
}
|
||||||
|
// Only check the hash if the user hasn't disabled hash checking
|
||||||
|
if (Utils.getConfigBoolean("security.check_update_hash", true)) {
|
||||||
String updateHash = createSha256(new File(updateFileName));
|
String updateHash = createSha256(new File(updateFileName));
|
||||||
logger.info("Download of new version complete; saved to " + updateFileName);
|
logger.info("Download of new version complete; saved to " + updateFileName);
|
||||||
logger.info("Checking hash of update");
|
logger.info("Checking hash of update");
|
||||||
@@ -241,6 +243,7 @@ public class UpdateUtils {
|
|||||||
} else {
|
} else {
|
||||||
logger.info("Hash is good");
|
logger.info("Hash is good");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (shouldLaunch) {
|
if (shouldLaunch) {
|
||||||
// Setup updater script
|
// Setup updater script
|
||||||
final String batchFile, script;
|
final String batchFile, script;
|
||||||
|
Reference in New Issue
Block a user