From 0599df81e2b29187fbe847138a326be4c63056a8 Mon Sep 17 00:00:00 2001 From: Pavel Nabutovsky Date: Sat, 11 Dec 2021 17:07:57 -0500 Subject: [PATCH] Mitigating CVE-2021-44228. https://solr.apache.org/security.html#apache-solr-affected-by-apache-log4j-cve-2021-44228 --- config/version.rb | 2 +- docker/solr/Dockerfile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/version.rb b/config/version.rb index 54857b54b1..0b72fcc1a4 100644 --- a/config/version.rb +++ b/config/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true class Primero::Application - VERSION = '2.2.0.1' + VERSION = '2.2.0.2' end diff --git a/docker/solr/Dockerfile b/docker/solr/Dockerfile index 4404061669..b5fe55c2f5 100644 --- a/docker/solr/Dockerfile +++ b/docker/solr/Dockerfile @@ -18,7 +18,11 @@ RUN bin/bash -c set -euox pipefail \ ; apt install -y $SOLR_PACKAGES \ ; chown -R $SOLR_USER:$SOLR_GROUP /var/solr/data \ ; chmod -R 700 /var/solr/data \ - ; chmod +x /sub.sh + ; chmod +x /sub.sh \ + ; cp /opt/solr/bin/solr.in.sh.orig /opt/solr/bin/solr.in.sh \ + ; echo 'Defending against CVE-2021-44228' \ + ; echo 'SOLR_OPTS="$SOLR_OPTS -Dlog4j2.formatMsgNoLookups=true"' >> /opt/solr/bin/solr.in.sh \ + ; mv /opt/solr/bin/solr.in.sh /etc/default/solr.in.sh USER $SOLR_USER # This could also be put in the compose file.