fix: Restrict inventory api calls to the device requested (#5267)

This commit is contained in:
Neil Lathwood
2017-01-01 09:37:28 +00:00
committed by GitHub
parent e20a242785
commit 4671fb48ab

View File

@ -1017,6 +1017,8 @@ function get_inventory()
$total_inv = 0;
$inventory = array();
} else {
$sql .= ' AND `device_id`=?';
$params[] = $device_id;
$inventory = dbFetchRows("SELECT * FROM `entPhysical` WHERE 1 $sql", $params);
$code = 200;
$status = 'ok';