From 2f834d44e2cce801c61dcca4047c34dc356be995 Mon Sep 17 00:00:00 2001 From: Simon Liebl Date: Thu, 25 Apr 2024 11:15:16 +0200 Subject: [PATCH] v0.4.25 --- CHANGELOG.md | 5 +++++ app/package.json | 2 +- package.json | 2 +- src/app/model/threat-model.ts | 2 +- src/app/util/data.service.ts | 7 ++++--- src/assets/version.json | 2 +- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 911efb5..4855256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.25 + +* Fix: LocalStorage exception content too long +* Fix: Setting threat rule type in configuration + ## 0.4.24 * Fix: Missing countermeasure state in export template diff --git a/app/package.json b/app/package.json index ca493af..676d6b1 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "ttmodeler", - "version": "0.4.24", + "version": "0.4.25", "description": "Thing Threat Modeler for Internet of Things Devices", "homepage": "https://www.simon-liebl.de/TTM", "author": { diff --git a/package.json b/package.json index f339bbe..cf551d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ttmodeler", - "version": "0.4.24", + "version": "0.4.25", "description": "Thing Threat Modeler for Internet of Things Devices", "homepage": "https://www.simon-liebl.de/TTM", "author": { diff --git a/src/app/model/threat-model.ts b/src/app/model/threat-model.ts index b7078c0..8663914 100644 --- a/src/app/model/threat-model.ts +++ b/src/app/model/threat-model.ts @@ -1090,7 +1090,7 @@ export class ThreatRuleGroup extends DatabaseBase { } public get RuleType(): RuleTypes { return this.Data['RuleType']; } - public set RuleType(val: RuleTypes) { this.Data['RuleType']; } + public set RuleType(val: RuleTypes) { this.Data['RuleType'] = val; } constructor(data, cf: ConfigFile) { super(data); diff --git a/src/app/util/data.service.ts b/src/app/util/data.service.ts index 3f33377..0a9cc02 100644 --- a/src/app/util/data.service.ts +++ b/src/app/util/data.service.ts @@ -1180,10 +1180,11 @@ export class DataService { const history = this.getLastFileHistory(); const index = history.findIndex(x => this.compareFiles(x, file)); if (index >= 0) history.splice(index, 1); - history.splice(0, 0, file); + const fileCopy = JSON.parse(JSON.stringify(file)); + delete fileCopy.importData; + history.splice(0, 0, fileCopy); this.locStorage.Set(LocStorageKeys.FILE_HISTORY, JSON.stringify(history)); - - this.locStorage.Set(LocStorageKeys.LAST_FILE, JSON.stringify(file)); + this.locStorage.Set(LocStorageKeys.LAST_FILE, JSON.stringify(fileCopy)); this.addFileToAvailableFiles(file); } diff --git a/src/assets/version.json b/src/assets/version.json index 8e4d999..4f75510 100644 --- a/src/assets/version.json +++ b/src/assets/version.json @@ -1,3 +1,3 @@ { - "version": "0.4.24" + "version": "0.4.25" } \ No newline at end of file