Fixed server crash when agent connects with unknown meshid.

This commit is contained in:
Ylian Saint-Hilaire 2019-02-20 09:39:41 -08:00
parent 474a9c2558
commit 62c5e3ebb5
2 changed files with 2 additions and 2 deletions

View File

@ -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 }); 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 { } else {
if ((mesh.deleted != null) && (mesh.links)) { if ((mesh != null) && (mesh.deleted != null) && (mesh.links)) {
// Must un-delete this mesh // Must un-delete this mesh
var ids = ['*', mesh._id]; var ids = ['*', mesh._id];

View File

@ -1,6 +1,6 @@
{ {
"name": "meshcentral", "name": "meshcentral",
"version": "0.2.8-x", "version": "0.2.8-y",
"keywords": [ "keywords": [
"Remote Management", "Remote Management",
"Intel AMT", "Intel AMT",