Fix sql injection (#11923)

in custom oid code

Thanks to loginsoft p.v.t l.t.d india for the report!
Website: https://www.loginsoft.com/
This commit is contained in:
Tony Murray
2020-07-10 03:45:39 -05:00
committed by GitHub
parent 8af976a951
commit 6e6fde94c3

View File

@@ -72,8 +72,8 @@ if (!empty(mres($_POST['user_func']))) {
}
if ($action == "test") {
$query = "SELECT * FROM `devices` WHERE `device_id` = $device_id LIMIT 1";
$device = dbFetchRow($query);
$query = "SELECT * FROM `devices` WHERE `device_id` = ? LIMIT 1";
$device = dbFetchRow($query, [$device_id]);
$rawdata = snmp_get($device, $oid, '-Oqv');