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

Fixed creating relayed devices in WAN mode.

This commit is contained in:
Ylian Saint-Hilaire 2022-04-14 14:30:33 -07:00
parent 5c1ee09605
commit 5707677e4e
3 changed files with 2616 additions and 2611 deletions

View file

@ -2325,7 +2325,6 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
}
case 'addlocaldevice':
{
if (args.wanonly == true) return; // This is a WAN-only server, local Intel AMT computers can't be added
if (common.validateString(command.meshid, 1, 1024) == false) break; // Check meshid
if ((command.meshid.split('/').length != 3) || (command.meshid.split('/')[1] != domain.id)) return; // Invalid domain, operation only valid for current domain
if (common.validateString(command.devicename, 1, 256) == false) break; // Check device name