Injector v4.8.0: Hash checksum and version verification

pull/8/head
Oj18 4 years ago
parent ca061caeb1
commit fc044d150d

@ -1,5 +1,11 @@
# GooseMod Changelog
## v4.8.0 [2020-11-02]
- ### Features
- Added hash checksum and version checking on initation for security / verification
## v4.7.0 [2020-11-02]
- ### Features

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

@ -92,9 +92,19 @@ const init = async function () {
this.disabledModules = {};
this.lastVersion = localStorage.getItem('goosemodLastVersion');
this.version = '4.7.0';
this.version = '4.8.0';
this.versionHash = '<hash>'; // Hash of built final js file is inserted here via build script
const latestInjectVersionInfo = await (await fetch('https://goosemod-api.netlify.app/injectVersion.json')).json();
if (latestInjectVersionInfo.version !== this.version) {
this.showToast('Warning: Version number does not match latest public release', {timeout: 3000});
}
if (latestInjectVersionInfo.hash !== this.versionHash) {
this.showToast('Warning: Version hash does not match latest public release', {timeout: 3000});
}
if (this.lastVersion && this.lastVersion !== this.version) {
this.goosemodChangelog.show();
}

Loading…
Cancel
Save