MeshAgent
MeshAgent copied to clipboard
Invalid JSON in sysinfo
Hi! MeshCentral is reporting that an invalid JSON is returned by an agent running on an Intel NUC. Here is an extract of the JSON build by the agent:
{
"hardware": {
"identifiers": {
...
},
"linux": {
"bios_date": "08/04/2016",
...
"bios_vendor": "Intel Corp.",
"board_asset_tag": "[",
"board_version": "H81131-505",
...
},
"agentvers": {
"openssl": "1.1.1l",
"duktape": "v2.6.0",
"commitDate": "2022-04-03T03:45:45.000Z",
"commitHash": "2fc1af473a96b5ad64011fd0575cfa15ee36d769",
"compileTime": "10:22:18, Apr 4 2022"
}
},
"hash": "F8765FECF09F2FDE88A1747DB70EE38D71B7D0A8D88A1ADC2924A86379C81D3D12585700A3AADF93AC5793C8C6FAC396"
}
The board_asset_tag attribute (retrieved from /sys/class/dmi/id/board_asset_tag) contains control characters, which are not properly escaped and are not valid in a JSON file.
Thanks!
Oh, interesting! I will work on a patch to make sure each field retrieved contains only valid characters.