updated recovery self update to skip auth check if agent doesn't expose control channel cert, and server doesn't pass an inner cert
Bryan Roe committed
Jan 17, 2021 at 22:09 UTC
e2368bf7ff61efc657ea76df8c4efa45a85cca29
1 file changed
+2
agents/meshcore.js
+2
@@ -4382,6 +4382,8 @@ function createMeshCore(agent)
4382
// Check that the certificate is the one expected by the server, fail if not.
4383
if (checkServerIdentity.servertlshash == null)
4384
{
4385
+ if (require('MeshAgent').ServerInfo == null || require('MeshAgent').ServerInfo.ControlChannelCertificate == null) { return; }
4386
+
4387
sendConsoleText('Self Update failed, because the url cannot be verified', sessionid);
4388
sendAgentMessage('Self Update failed, because the url cannot be verified', 3);
4389
throw new Error('BadCert');