diff --git a/CHANGELOG.md b/CHANGELOG.md index 69dcf5dc31..f746f3754c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## [2.13.2](https://github.com/CERT-BDF/TheHive/tree/2.13.2) (2017-10-24) + +[Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.13.1...2.13.2) + +**Fixed bugs:** + +- Security issue on Play 2.6.5 [\#356](https://github.com/CERT-BDF/TheHive/issues/356) +- Incorrect stats: non-IOC observables counted as IOC and IOC word displayed twice [\#347](https://github.com/CERT-BDF/TheHive/issues/347) +- Deleted Observables, Show up on the statistics tab under Observables by Type [\#343](https://github.com/CERT-BDF/TheHive/issues/343) +- Statistics on metrics doesn't work [\#342](https://github.com/CERT-BDF/TheHive/issues/342) +- Error on custom fields format when merging cases [\#331](https://github.com/CERT-BDF/TheHive/issues/331) + ## [2.13.1](https://github.com/CERT-BDF/TheHive/tree/2.13.1) (2017-09-18) [Full Changelog](https://github.com/CERT-BDF/TheHive/compare/2.13.0...2.13.1) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 1985b3ceb7..9c0b6375ed 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -32,6 +32,6 @@ object Dependencies { val reflections = "org.reflections" % "reflections" % "0.9.11" val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2" val akkaTest = "com.typesafe.akka" %% "akka-stream-testkit" % "2.5.4" - val elastic4play = "org.cert-bdf" %% "elastic4play" % "1.3.1" + val elastic4play = "org.cert-bdf" %% "elastic4play" % "1.3.2" } } diff --git a/thehive-backend/app/models/Migration.scala b/thehive-backend/app/models/Migration.scala index d5467b7138..a3aa2af8ca 100644 --- a/thehive-backend/app/models/Migration.scala +++ b/thehive-backend/app/models/Migration.scala @@ -237,6 +237,7 @@ class Migration( val customFields = (caze \ "customFields").asOpt[JsObject].getOrElse(JsObject(Nil)) caze + ("metrics" → metrics) + ("customFields" → customFields) }) + case DatabaseState(10) ⇒ Nil } private val requestCounter = new java.util.concurrent.atomic.AtomicInteger(0) diff --git a/thehive-backend/app/models/package.scala b/thehive-backend/app/models/package.scala index f2f10fe052..a7b96e9822 100644 --- a/thehive-backend/app/models/package.scala +++ b/thehive-backend/app/models/package.scala @@ -1,5 +1,5 @@ package object models { - val modelVersion = 10 + val modelVersion = 11 } \ No newline at end of file diff --git a/thehive-backend/app/services/CaseMergeSrv.scala b/thehive-backend/app/services/CaseMergeSrv.scala index 9bd9b7788d..bf2e80ec5c 100644 --- a/thehive-backend/app/services/CaseMergeSrv.scala +++ b/thehive-backend/app/services/CaseMergeSrv.scala @@ -123,12 +123,12 @@ class CaseMergeSrv @Inject() ( customFieldsObject ← caze.customFields().asOpt[JsObject] } yield customFieldsObject - val mergedCustomFieldsObject: Seq[(String, JsValue)] = customFields.flatMap(_.keys).distinct.map { key ⇒ + val mergedCustomFieldsObject: Seq[(String, JsValue)] = customFields.flatMap(_.keys).distinct.flatMap { key ⇒ val customFieldsValues = customFields.flatMap(cf ⇒ (cf \ key).asOpt[JsObject]).distinct if (customFieldsValues.size != 1) - key → JsNull + None else - key → customFieldsValues.head + Some(key → customFieldsValues.head) } JsObject(mergedCustomFieldsObject) diff --git a/ui/app/scripts/controllers/StatisticsCtrl.js b/ui/app/scripts/controllers/StatisticsCtrl.js index 98fcddb416..273dcf6ea6 100644 --- a/ui/app/scripts/controllers/StatisticsCtrl.js +++ b/ui/app/scripts/controllers/StatisticsCtrl.js @@ -128,7 +128,8 @@ type: 'case_artifact', field: 'dataType', dateField: 'startDate', - tagsField: 'tags' + tagsField: 'tags', + filter: {status: 'Ok'} }; $scope.observableByIoc = { @@ -138,9 +139,10 @@ dateField: 'startDate', tagsField: 'tags', names: { - '0': 'NOT IOC', - '1': 'IOC' - } + 'false': 'NOT IOC', + 'true': 'IOC' + }, + filter: {status: 'Ok'} }; $scope.observableOverTime = { @@ -154,7 +156,8 @@ }, types: { startDate: 'bar' - } + }, + filter: {status: 'Ok'} }; $scope.setTagsAggregator = function(aggregator) { diff --git a/ui/app/views/partials/observables/list/mini-stats.html b/ui/app/views/partials/observables/list/mini-stats.html index cae309b555..ca1b0c66fa 100644 --- a/ui/app/views/partials/observables/list/mini-stats.html +++ b/ui/app/views/partials/observables/list/mini-stats.html @@ -24,9 +24,9 @@
{{(item.key === '0') ? 'Not IOC' : 'IOC' }} | +{{(item.key === 'false') ? 'Not IOC' : 'IOC' }} | - {{item.count}} + {{item.count}} |