Can now disable the update hash check

This commit is contained in:
cyian-1756 2018-06-02 16:02:52 -04:00
parent 10d256a6e5
commit b0bcf506aa

View File

@ -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;