#21: Add signature validation during installations
This commit is contained in:
15
src/App.js
15
src/App.js
@@ -300,7 +300,7 @@ class App extends IPCContainer {
|
||||
this.sendRequest(Constants.IPC_Install_Upgrade, {
|
||||
Sha256: sha256,
|
||||
Signature: signature,
|
||||
SkipVerification: false,
|
||||
SkipVerification: !!data.SkipVerification,
|
||||
Source: data.Destination,
|
||||
});
|
||||
} else {
|
||||
@@ -507,6 +507,19 @@ class App extends IPCContainer {
|
||||
DownloadActive: false,
|
||||
DownloadProgress: 0.0,
|
||||
DownloadName: '',
|
||||
}, () => {
|
||||
if (!arg.data.Success) {
|
||||
this.setErrorState(arg.data.Error, () => {
|
||||
// TODO Prompt to verify
|
||||
if (arg.data.AllowSkipVerification) {
|
||||
this.installUpgrade( {
|
||||
SkipVerification: true,
|
||||
Source: arg.data.Source,
|
||||
Success: true,
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user