@capgo/capacitor-updater 7.0.26 → 7.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -57,7 +57,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
57
57
|
private static final String statsUrlDefault = "https://plugin.capgo.app/stats";
|
|
58
58
|
private static final String channelUrlDefault = "https://plugin.capgo.app/channel_self";
|
|
59
59
|
|
|
60
|
-
private final String PLUGIN_VERSION = "7.0.
|
|
60
|
+
private final String PLUGIN_VERSION = "7.0.28";
|
|
61
61
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
62
62
|
|
|
63
63
|
private SharedPreferences.Editor editor;
|
|
@@ -400,12 +400,9 @@ public class DownloadService extends Worker {
|
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
String decryptedExpectedHash = expectedHash;
|
|
404
|
-
|
|
405
403
|
if (!publicKey.isEmpty() && sessionKey != null && !sessionKey.isEmpty()) {
|
|
406
404
|
Log.d(CapacitorUpdater.TAG + " DLSrv", "Decrypting file " + targetFile.getName());
|
|
407
405
|
CryptoCipherV2.decryptFile(compressedFile, publicKey, sessionKey);
|
|
408
|
-
decryptedExpectedHash = CryptoCipherV2.decryptChecksum(decryptedExpectedHash, publicKey);
|
|
409
406
|
}
|
|
410
407
|
|
|
411
408
|
// Use new decompression method
|
|
@@ -418,7 +415,7 @@ public class DownloadService extends Worker {
|
|
|
418
415
|
String calculatedHash = CryptoCipherV2.calcChecksum(targetFile);
|
|
419
416
|
|
|
420
417
|
// Verify checksum
|
|
421
|
-
if (calculatedHash.equals(
|
|
418
|
+
if (calculatedHash.equals(expectedHash)) {
|
|
422
419
|
// Only cache if checksum is correct
|
|
423
420
|
copyFile(targetFile, cacheFile);
|
|
424
421
|
} else {
|
|
@@ -429,7 +426,7 @@ public class DownloadService extends Worker {
|
|
|
429
426
|
" " +
|
|
430
427
|
targetFile.getName() +
|
|
431
428
|
" expected: " +
|
|
432
|
-
|
|
429
|
+
expectedHash +
|
|
433
430
|
" calculated: " +
|
|
434
431
|
calculatedHash
|
|
435
432
|
);
|
|
@@ -45,7 +45,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
45
45
|
CAPPluginMethod(name: "getNextBundle", returnType: CAPPluginReturnPromise)
|
|
46
46
|
]
|
|
47
47
|
public var implementation = CapacitorUpdater()
|
|
48
|
-
private let PLUGIN_VERSION: String = "7.0.
|
|
48
|
+
private let PLUGIN_VERSION: String = "7.0.28"
|
|
49
49
|
static let updateUrlDefault = "https://plugin.capgo.app/updates"
|
|
50
50
|
static let statsUrlDefault = "https://plugin.capgo.app/stats"
|
|
51
51
|
static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
|