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 14:52:58 -05:00
parent 1bb6bd8405
commit 8f3a29cde5
+2 -2
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');