Skip to content

Commit

Permalink
Shrank image size and fixed hash logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lomilar committed Oct 13, 2023
1 parent 2c52084 commit af2eb4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/standalone/node/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WORKDIR /app
COPY package.json ./
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt update && apt dist-upgrade -y && apt clean

RUN apt install -qqy build-essential checkinstall zlib1g-dev wget libssl-dev curl clang && cd /usr/local/src && wget https://www.openssl.org/source/openssl-3.0.8.tar.gz && tar xvf openssl-3.0.8.tar.gz && cd openssl-3.0.8 && ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib enable-fips linux-x86_64 && make -j8 > make.log && make install > makeinstall.log && make install_ssldirs > makeinstallssldirs.log && make install_fips > makeinstallfips.log && cd / && apt remove -qqy build-essential checkinstall zlib1g-dev wget libssl-dev curl clang && apt autoremove -qqy && apt clean
RUN apt install -qqy build-essential checkinstall zlib1g-dev wget libssl-dev curl clang && cd /usr/local/src && wget https://www.openssl.org/source/openssl-3.0.8.tar.gz && tar xvf openssl-3.0.8.tar.gz && cd openssl-3.0.8 && ./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib enable-fips linux-x86_64 && make -j8 > make.log && make install > makeinstall.log && make install_ssldirs > makeinstallssldirs.log && make install_fips > makeinstallfips.log && cd / && rm -rf cd /usr/local/src/openssl-3.0.8 && apt remove -qqy build-essential checkinstall zlib1g-dev wget libssl-dev curl clang && apt autoremove -qqy && apt clean
RUN openssl version

ENV OPENSSL_CONF=/usr/local/ssl/nodejs.cnf
Expand Down
4 changes: 2 additions & 2 deletions src/main/server/shims/auditLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let hash = function(msg) {
let concat = previousHash + msg;
let newHash = EcCrypto.md5(concat);
previousHash = newHash;
return `${msg} ${newHash}`;
return `${newHash} ${msg}`;
};

let syslogFormat = function(facility, severity, timestamp, msgID, data) {
Expand All @@ -96,7 +96,7 @@ let report = function(system, severity, message, ...data) {
try {
if (filterLogs(system, severity, message)) {
const msg = JSON.stringify({date: new Date(), message, data, system, severity});
logBuffers.push(msg);
logBuffers.push(hash(msg));
}
if (logBuffers.length > 1000) {
flush();
Expand Down

0 comments on commit af2eb4b

Please sign in to comment.