1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

New agents, NeDB encryption, WebApp Fixes.

This commit is contained in:
Ylian Saint-Hilaire 2019-01-24 12:08:48 -08:00
parent 35e8f9b94a
commit 110b58cd58
35 changed files with 90 additions and 7437 deletions

View file

@ -96,7 +96,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
// If this is a MeshMessenger session, the ID is the two userid's and authentication must match one of them.
if (obj.id.startsWith('meshmessenger/')) {
if (obj.user == null) { try { obj.close(); } catch (e) { } return null; }
if ((obj.id.startsWith('meshmessenger/user/') == true) && (obj.user == null)) { try { obj.close(); } catch (e) { } return null; } // If user-to-user, both sides need to be authenticated.
var x = obj.id.split('/'), user1 = x[1] + '/' + x[2] + '/' + x[3], user2 = x[4] + '/' + x[5] + '/' + x[6];
if ((x[1] != 'user') && (x[4] != 'user')) { try { obj.close(); } catch (e) { } return null; } // MeshMessenger session must have at least one authenticated user
if ((x[1] == 'user') && (x[4] == 'user')) {