Socket
Socket
Sign inDemoInstall

electron-updater

Package Overview
Dependencies
Maintainers
3
Versions
290
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-updater - npm Package Compare versions

Comparing version 2.2.2 to 2.2.3

27

out/NsisUpdater.js

@@ -95,8 +95,19 @@ "use strict";

const tempFile = _path.join(tempDir, fileInfo.name);
let removeTempDirIfAny = (() => {
var _ref = (0, (_bluebirdLst || _load_bluebirdLst()).coroutine)(function* () {
try {
yield (0, (_fsExtraP || _load_fsExtraP()).remove)(tempDir);
} catch (ignored) {}
});
return function removeTempDirIfAny() {
return _ref.apply(this, arguments);
};
})();
let signatureVerificationStatus;
try {
yield _this.httpExecutor.download(fileInfo.url, tempFile, downloadOptions);
signatureVerificationStatus = yield _this.verifySignature(tempFile);
} catch (e) {
try {
yield (0, (_fsExtraP || _load_fsExtraP()).remove)(tempDir);
} catch (ignored) {}
yield removeTempDirIfAny();
if (e instanceof (_CancellationToken || _load_CancellationToken()).CancellationError) {

@@ -108,10 +119,6 @@ _this.emit("update-cancelled", _this.versionInfo);

}
const signatureVerificationStatus = yield _this.verifySignature(tempFile);
if (signatureVerificationStatus != null) {
try {
yield (0, (_fsExtraP || _load_fsExtraP()).remove)(tempDir);
} finally {
// noinspection ThrowInsideFinallyBlockJS
throw new Error(`New version ${_this.versionInfo.version} is not signed by the application owner: ${signatureVerificationStatus}`);
}
yield removeTempDirIfAny();
// noinspection ThrowInsideFinallyBlockJS
throw new Error(`New version ${_this.versionInfo.version} is not signed by the application owner: ${signatureVerificationStatus}`);
}

@@ -118,0 +125,0 @@ _this._logger.info(`New version ${_this.versionInfo.version} has been downloaded to ${tempFile}`);

{
"name": "electron-updater",
"version": "2.2.2",
"version": "2.2.3",
"description": "Cross platform updater for electron applications",

@@ -20,3 +20,3 @@ "main": "out/main.js",

"source-map-support": "^0.4.15",
"electron-builder-http": "~19.2.3",
"electron-builder-http": "~19.4.0",
"electron-is-dev": "^0.1.2",

@@ -23,0 +23,0 @@ "xelement": "^1.0.16",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc