mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-09 15:40:18 +00:00
Added extra sysinfo validation.
This commit is contained in:
parent
328d478319
commit
fc7bb97a37
2 changed files with 25 additions and 0 deletions
|
@ -1360,6 +1360,10 @@ module.exports.CreateMeshAgent = function (parent, db, ws, req, args, domain) {
|
|||
}
|
||||
case 'sysinfo': {
|
||||
if ((typeof command.data == 'object') && (typeof command.data.hash == 'string')) {
|
||||
// Validate command.data.
|
||||
if (common.validateObjectForMongo(command.data, 1024) == false) break;
|
||||
|
||||
// Save to database
|
||||
command.data._id = 'si' + obj.dbNodeKey;
|
||||
command.data.type = 'sysinfo';
|
||||
command.data.domain = domain.id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue