Skip to content

Commit

Permalink
Merge branch 'release/3.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Mar 1, 2021
2 parents da75a6e + 8b893b0 commit 4bb3f50
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 18 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## [3.1.1](https://github.com/TheHive-Project/Cortex/milestone/28) (2021-03-01)

**Implemented enhancements:**

- [Improvement] Create logfile after installation [\#341](https://github.com/TheHive-Project/Cortex/issues/341)

**Fixed bugs:**

- [BUG] Certificate not taken into account when running neurons with process [\#317](https://github.com/TheHive-Project/Cortex/issues/317)
- [Bug] Update doesn't work on Elasticsearch 7.11 [\#346](https://github.com/TheHive-Project/Cortex/issues/346)

## [3.1.0](https://github.com/TheHive-Project/Cortex/milestone/27) (2020-10-30)

**Implemented enhancements:**
Expand Down
1 change: 1 addition & 0 deletions app/org/thp/cortex/models/Migration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ class Migration @Inject() (userSrv: UserSrv, organizationSrv: OrganizationSrv, w
}
)
case DatabaseState(4) => Nil
case DatabaseState(5) => Nil
}
}
2 changes: 1 addition & 1 deletion app/org/thp/cortex/models/package.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package org.thp.cortex

package object models {
val modelVersion = 5
val modelVersion = 6
}
4 changes: 3 additions & 1 deletion app/org/thp/cortex/services/ProcessJobRunnerSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ class ProcessJobRunnerSrv @Inject() (implicit val system: ActorSystem) {
val baseDirectory = Paths.get(command).getParent.getParent
val output = StringBuilder.newBuilder
logger.info(s"Execute $command in $baseDirectory, timeout is ${timeout.fold("none")(_.toString)}")
val process = Process(Seq(command, jobDirectory.toString), baseDirectory.toFile)
val cacertsFile = jobDirectory.resolve("input").resolve("cacerts")
val env = if (Files.exists(cacertsFile)) Seq("REQUESTS_CA_BUNDLE" -> cacertsFile.toString) else Nil
val process = Process(Seq(command, jobDirectory.toString), baseDirectory.toFile, env: _*)
.run(ProcessLogger { s =>
logger.info(s" Job ${job.id}: $s")
output ++= s
Expand Down
3 changes: 2 additions & 1 deletion package/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ case "$1" in

# Chown definitions created by SBT Native Packager

chown cortex:cortex /var/log/cortex
touch /var/log/cortex/application.log
chown -R cortex:cortex /var/log/cortex
chown root:cortex /etc/cortex/application.conf /etc/cortex/logback.xml
chmod 0640 /etc/cortex/application.conf /etc/cortex/logback.xml

Expand Down
1 change: 1 addition & 0 deletions package/docker/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ fi

echo config file is:
cat "$CONFIG_FILE"
touch /var/log/cortex/application.log
chown -R "$DAEMON_USER" /var/log/cortex
chown -R "$DAEMON_USER" /etc/cortex
chown -R "$DAEMON_USER" "$CONFIG_FILE"
Expand Down
3 changes: 3 additions & 0 deletions package/rpm/post
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mkdir -p /var/log/cortex
touch /var/log/cortex/application.log
chown -R cortex:cortex /var/log/cortex
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object Dependencies {

val reflections = "org.reflections" % "reflections" % "0.9.11"
val zip4j = "net.lingala.zip4j" % "zip4j" % "1.3.2"
val elastic4play = "org.thehive-project" %% "elastic4play" % "1.12.3"
val elastic4play = "org.thehive-project" %% "elastic4play" % "1.13.1"
val dockerClient = "com.spotify" % "docker-client" % "8.14.4"
val akkaCluster = "com.typesafe.akka" %% "akka-cluster" % play.core.PlayVersion.akkaVersion
val akkaClusterTyped = "com.typesafe.akka" %% "akka-cluster-typed" % play.core.PlayVersion.akkaVersion
Expand Down
2 changes: 1 addition & 1 deletion rpm.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rpmRequirements += "java-1.8.0-openjdk-headless"

maintainerScripts in Rpm := maintainerScriptsFromDirectory(
baseDirectory.value / "package" / "rpm",
Seq(RpmConstants.Pre, RpmConstants.Preun, RpmConstants.Postun)
Seq(RpmConstants.Pre, RpmConstants.Preun, RpmConstants.Post, RpmConstants.Postun)
)

linuxPackageSymlinks in Rpm := Nil
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "3.1.0-1"
version in ThisBuild := "3.1.1-1"
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cortex",
"version": "3.1.0",
"version": "3.1.1",
"description": "A powerfull observable analysis engine",
"license": "AGPL-3.0-or-later",
"homepage": "https://github.com/TheHive-Project/Cortex",
Expand Down
10 changes: 6 additions & 4 deletions www/src/app/components/about/about.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="modal-header bg-primary">
<h3 class="modal-title">About</h3>
</div>
<div class="modal-body">
<div class="modal-body">
<div class="pv-s text-center">
<img alt="Cortex" height="50" src="../../../assets/images/logo-dark.svg" />
</div>
Expand All @@ -20,8 +20,10 @@ <h3 class="modal-title">About</h3>
</div>
<div class="row mt-s">
<div class="col-md-12 text-center">
<div>Copyright (C) 2014-2020 Thomas Franco, Saâd Kadhi, Jérôme Leonard</div>
<div>Copyright (C) 2017-2020 Nabil Adouani</div>
<strong>
<a href="https://thehive-project.org" target="_blank">TheHive Project</a> 2016-2021,
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank">AGPL-V3</a>
</strong>
</div>
</div>

Expand All @@ -32,4 +34,4 @@ <h3 class="modal-title">About</h3>
Close
</div>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions www/src/app/components/footer/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
</div>
<div>
<strong>
<a href="http://www.thehive-project.org" target="_blank">TheHive Project</a> 2016-2020,
<a href="http://www.thehive-project.org" target="_blank">TheHive Project</a> 2016-2021,
<a href="https://www.gnu.org/licenses/agpl-3.0.en.html" target="_blank">AGPL-V3</a>
</strong>
</div>
</div>
</div>
9 changes: 4 additions & 5 deletions www/src/app/core/services/common/StreamService.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,11 @@ export default function (app) {
// Initialize the stream;
this.isPolling = false;

if (err.status === 401) {
return;
}
if (err.status !== 404) {
NotificationService.error('StreamSrv', err.data, err.status);

if (err.status === 401) {
return;
}
}

this.init();
Expand Down Expand Up @@ -181,4 +180,4 @@ export default function (app) {
}

app.service('StreamSrv', StreamSrv);
}
}

0 comments on commit 4bb3f50

Please sign in to comment.