mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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');
|
||||
|
||||
|
Reference in New Issue
Block a user