From 62c5e3ebb5df0ad207fe7e2f004eb21016c36ab7 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Wed, 20 Feb 2019 09:39:41 -0800 Subject: [PATCH] Fixed server crash when agent connects with unknown meshid. --- meshagent.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meshagent.js b/meshagent.js index 4d96bc68..65a387c8 100644 --- a/meshagent.js +++ b/meshagent.js @@ -454,7 +454,7 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) { obj.parent.parent.DispatchEvent(['*', obj.dbMeshKey, adminUser._id], obj, { etype: 'mesh', username: adminUser.name, meshid: obj.dbMeshKey, name: meshname, mtype: 2, desc: '', action: 'createmesh', links: links, msg: 'Mesh created: ' + obj.meshid, domain: domain.id }); } } else { - if ((mesh.deleted != null) && (mesh.links)) { + if ((mesh != null) && (mesh.deleted != null) && (mesh.links)) { // Must un-delete this mesh var ids = ['*', mesh._id]; diff --git a/package.json b/package.json index 086ba7ae..f41a2757 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.2.8-x", + "version": "0.2.8-y", "keywords": [ "Remote Management", "Intel AMT",