From ea7e98b3b4f61268811a956d9d9e20a398673728 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 8 Jun 2022 10:47:23 -0700 Subject: [PATCH] Added BREACH attack mittigation, #4084 --- MeshCentralServer.njsproj | 1 + meshcentral-config-schema.json | 1 + public/translate.bat | 4 +- views/agentinvite.handlebars | 2 + views/default-mobile.handlebars | 1 + views/default.handlebars | 1 + views/download.handlebars | 1 + views/download2.handlebars | 1 + views/error404.handlebars | 1 + views/invite.handlebars | 1 + views/login-mobile.handlebars | 1 + views/login.handlebars | 1 + views/login2.handlebars | 1 + views/message.handlebars | 1 + views/message2.handlebars | 1 + views/messenger.handlebars | 1397 ++++++++++++++++--------------- views/mstsc.handlebars | 1 + views/player.handlebars | 1 + views/sharing-mobile.handlebars | 1 + views/sharing.handlebars | 1 + views/ssh.handlebars | 1 + views/terms.handlebars | 1 + views/xterm.handlebars | 1 + webserver.js | 4 + 24 files changed, 727 insertions(+), 700 deletions(-) diff --git a/MeshCentralServer.njsproj b/MeshCentralServer.njsproj index 45fa3f15..7cbdaf20 100644 --- a/MeshCentralServer.njsproj +++ b/MeshCentralServer.njsproj @@ -613,6 +613,7 @@ + diff --git a/meshcentral-config-schema.json b/meshcentral-config-schema.json index 4f33a665..528883bf 100644 --- a/meshcentral-config-schema.json +++ b/meshcentral-config-schema.json @@ -120,6 +120,7 @@ "amtManager": { "type": "boolean", "default": true, "description": "When enabled, MeshCentral will automatically monitor and manage Intel AMT devices." }, "orphanAgentUser": { "type": "string", "default": null, "description": "If an agent attempts to connect to a unknown device group, automatically create a new device group and grant access to the specified user. Example: admin" }, "agentIdleTimeout": { "type": "integer", "minimum": 1, "default": 150 ,"description": "How much time in seconds with no traffic from an agent before dropping the agent connection." }, + "webPageLengthRandomization": { "type": "boolean", "default": true, "description": "Adds a random length string to generated web pages to mitigate a BREACH attack." }, "compression": { "type": "boolean", "default": true, "description": "Enables GZIP compression for web requests." }, "wsCompression": { "type": "boolean", "default": false, "description": "Enables server-side, websocket per-message deflate compression." }, "agentWsCompression": { "type": "boolean", "default": true, "description": "Enables agent-side, websocket per-message deflate compression. wscompression must also be true for this to work." }, diff --git a/public/translate.bat b/public/translate.bat index 2b94c869..6b064b3f 100644 --- a/public/translate.bat +++ b/public/translate.bat @@ -1,7 +1,7 @@ @ECHO OFF CD ..\translate %LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js minifyall -%LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js translateall -%LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js extractall +REM %LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js translateall +REM %LOCALAPPDATA%\..\Roaming\nvm\v12.13.0\node translate.js extractall DEL ..\emails\translations\*-min_* Pause \ No newline at end of file diff --git a/views/agentinvite.handlebars b/views/agentinvite.handlebars index e03bd6ec..902a7df8 100644 --- a/views/agentinvite.handlebars +++ b/views/agentinvite.handlebars @@ -167,6 +167,8 @@ diff --git a/views/mstsc.handlebars b/views/mstsc.handlebars index d384e033..8c5ef9b5 100644 --- a/views/mstsc.handlebars +++ b/views/mstsc.handlebars @@ -75,6 +75,7 @@ }