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

Added device sharing link management support to MeshCtrl.js

This commit is contained in:
Ylian Saint-Hilaire 2021-01-05 17:02:24 -08:00
parent b3507445f5
commit a98cdc1d5e
4 changed files with 156 additions and 10 deletions

View file

@ -836,7 +836,7 @@ module.exports.CreateMeshRelay = function (parent, ws, req, domain, user, cookie
function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
// Do validation work
if (cookie) {
if ((typeof cookie.expire == 'number') && (cookie.expire <= currentTime)) { delete req.query.nodeid; }
if ((typeof cookie.expire == 'number') && (cookie.expire <= Date.now())) { delete req.query.nodeid; }
else if (typeof cookie.nid == 'string') { req.query.nodeid = cookie.nid; }
}
if ((req.query.nodeid == null) || (req.query.p != '2') || (req.query.id == null) || (domain == null)) { try { ws.close(); } catch (e) { } return; } // Not is not a valid remote desktop connection.