@capgo/capacitor-updater 6.14.14 → 6.14.16
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.
|
@@ -229,9 +229,11 @@ public class DownloadService extends Worker {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
if (hasError.get()) {
|
|
232
|
+
Log.e(TAG, "One or more files failed to download");
|
|
232
233
|
throw new IOException("One or more files failed to download");
|
|
233
234
|
}
|
|
234
235
|
} catch (Exception e) {
|
|
236
|
+
Log.e(TAG, "Error in handleManifestDownload", e);
|
|
235
237
|
throw new RuntimeException(e.getLocalizedMessage());
|
|
236
238
|
}
|
|
237
239
|
}
|
|
@@ -398,12 +400,9 @@ public class DownloadService extends Worker {
|
|
|
398
400
|
}
|
|
399
401
|
}
|
|
400
402
|
|
|
401
|
-
String decryptedExpectedHash = expectedHash;
|
|
402
|
-
|
|
403
403
|
if (!publicKey.isEmpty() && sessionKey != null && !sessionKey.isEmpty()) {
|
|
404
404
|
Log.d(CapacitorUpdater.TAG + " DLSrv", "Decrypting file " + targetFile.getName());
|
|
405
405
|
CryptoCipherV2.decryptFile(compressedFile, publicKey, sessionKey);
|
|
406
|
-
decryptedExpectedHash = CryptoCipherV2.decryptChecksum(decryptedExpectedHash, publicKey);
|
|
407
406
|
}
|
|
408
407
|
|
|
409
408
|
// Use new decompression method
|
|
@@ -416,7 +415,7 @@ public class DownloadService extends Worker {
|
|
|
416
415
|
String calculatedHash = CryptoCipherV2.calcChecksum(targetFile);
|
|
417
416
|
|
|
418
417
|
// Verify checksum
|
|
419
|
-
if (calculatedHash.equals(
|
|
418
|
+
if (calculatedHash.equals(expectedHash)) {
|
|
420
419
|
// Only cache if checksum is correct
|
|
421
420
|
copyFile(targetFile, cacheFile);
|
|
422
421
|
} else {
|
|
@@ -427,7 +426,7 @@ public class DownloadService extends Worker {
|
|
|
427
426
|
" " +
|
|
428
427
|
targetFile.getName() +
|
|
429
428
|
" expected: " +
|
|
430
|
-
|
|
429
|
+
expectedHash +
|
|
431
430
|
" calculated: " +
|
|
432
431
|
calculatedHash
|
|
433
432
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-updater",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.16",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Live update for capacitor apps",
|
|
6
6
|
"main": "dist/plugin.cjs.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"CapgoCapacitorUpdater.podspec",
|
|
17
17
|
"Package.swift"
|
|
18
18
|
],
|
|
19
|
-
"author": "Martin Donadieu",
|
|
19
|
+
"author": "Martin Donadieu <martin@capgo.app>",
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
22
|
"url": "git+https://github.com/Cap-go/capacitor-updater.git"
|