From e2368bf7ff61efc657ea76df8c4efa45a85cca29 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Sun, 17 Jan 2021 22:09:00 -0800 Subject: [PATCH] updated recovery self update to skip auth check if agent doesn't expose control channel cert, and server doesn't pass an inner cert --- agents/meshcore.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agents/meshcore.js b/agents/meshcore.js index 0302917a..071d0a6f 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -4382,6 +4382,8 @@ function createMeshCore(agent) // Check that the certificate is the one expected by the server, fail if not. if (checkServerIdentity.servertlshash == null) { + if (require('MeshAgent').ServerInfo == null || require('MeshAgent').ServerInfo.ControlChannelCertificate == null) { return; } + sendConsoleText('Self Update failed, because the url cannot be verified', sessionid); sendAgentMessage('Self Update failed, because the url cannot be verified', 3); throw new Error('BadCert');