diff --git a/CHANGELOG.md b/CHANGELOG.md index 815fc3be8..277b8f37f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# v4.5.1 - 21 October 2021 + +## Fixes +- Fixes support for ATT&CK versions with more than 1 digit (ex. ATT&CK v10). + - Uploaded layers without a specified ATT&CK version will no longer try and fail to load ATT&CK v1 + - Uploaded layers uring ATT&CK v10 will no longer try and fail to load ATT&CK v1 + - Downloaded layers using ATT&CK v10 will no longer claim they use ATT&CK v1 + # v4.5.0 - 21 October 2021 ## New Features diff --git a/nav-app/package-lock.json b/nav-app/package-lock.json index 061d1c6b7..c6f1a492a 100755 --- a/nav-app/package-lock.json +++ b/nav-app/package-lock.json @@ -1,6 +1,6 @@ { "name": "attack-navigator", - "version": "4.5.0", + "version": "4.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/nav-app/package.json b/nav-app/package.json index de23c57d8..674aad1de 100755 --- a/nav-app/package.json +++ b/nav-app/package.json @@ -5,7 +5,7 @@ "type": "git", "url": "https://github.com/mitre-attack/attack-navigator.git" }, - "version": "4.5.0", + "version": "4.5.1", "license": "Apache-2.0", "scripts": { "ng": "ng", diff --git a/nav-app/src/app/data.service.ts b/nav-app/src/app/data.service.ts index f47244645..ae9b07d59 100755 --- a/nav-app/src/app/data.service.ts +++ b/nav-app/src/app/data.service.ts @@ -329,14 +329,14 @@ export class DataService { * Retrieves the first version defined in the config file */ getCurrentVersion() { - return this.versions[0].match(/v[0-9]/g)[0].toLowerCase(); + return this.versions[0].match(/v[0-9]+/g)[0].toLowerCase(); } /** * Is the given version supported? */ isSupported(version: string) { - return version.match(/[0-9]/g)[0] < this.versions[this.versions.length - 1].match(/[0-9]/g)[0]? false : true; + return version.match(/[0-9]+/g)[0] < this.versions[this.versions.length - 1].match(/[0-9]+/g)[0]? false : true; } /** @@ -801,6 +801,6 @@ export class Domain { * Get version of this domain */ getVersion() { - return this.version.match(/[0-9]/g)[0]; + return this.version.match(/[0-9]+/g)[0]; } } diff --git a/nav-app/src/app/globals.ts b/nav-app/src/app/globals.ts index c71b65f32..5c9b8061c 100755 --- a/nav-app/src/app/globals.ts +++ b/nav-app/src/app/globals.ts @@ -5,5 +5,5 @@ // 'use strict'; -export const nav_version: string="4.5.0" +export const nav_version: string="4.5.1" export const layer_version: string="4.2" diff --git a/nav-app/src/app/viewmodels.service.ts b/nav-app/src/app/viewmodels.service.ts index d4d4fa5c7..6742aea31 100755 --- a/nav-app/src/app/viewmodels.service.ts +++ b/nav-app/src/app/viewmodels.service.ts @@ -1169,7 +1169,7 @@ export class ViewModel { "layer": globals.layer_version } - rep.domain = this.domainVersionID.substr(0, this.domainVersionID.search(/-v[0-9]/g)); + rep.domain = this.domainVersionID.substr(0, this.domainVersionID.search(/-v[0-9]+/g)); rep.description = this.description; rep.filters = JSON.parse(this.filters.serialize()); rep.sorting = this.sorting; @@ -1199,7 +1199,7 @@ export class ViewModel { if ("versions" in obj) { if ("attack" in obj.versions) { if (typeof(obj.versions.attack) === "string") { - if (obj.versions.attack.length > 0) this.version = "v" + obj.versions.attack.match(/[0-9]/g)[0]; + if (obj.versions.attack.length > 0) this.version = "v" + obj.versions.attack.match(/[0-9]+/g)[0]; } else console.error("TypeError: attack version field is not a string"); }