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

Fixed for typing issue #2416

This commit is contained in:
Ylian Saint-Hilaire 2021-04-15 15:38:07 -07:00
parent 9a71a2b83a
commit 56ba656bd4
4 changed files with 33 additions and 1 deletions

View file

@ -5610,6 +5610,15 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
}
break;
}
case 'createLoginToken': {
if ((typeof domain.passwordrequirements != 'object') && (domain.passwordrequirements.logintokens == false)) break; // Login tokens are not supported on this server
if (common.validateString(command.name, 1, 100) == false) break; // Check name
if ((typeof command.expire != 'number') || (command.expire < 0)) break; // Check expire
console.log(command);
break;
}
case 'getDeviceDetails': {
if (common.validateStrArray(command.nodeids, 1) == false) break; // Check nodeids
if (common.validateString(command.type, 3, 4) == false) break; // Check type