mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Strip " and / from snmpwalk_cache_oid() (#7063)
* fix: Strip " and / from snmpwalk_cache_oid() * updated trim() * Remove redundant trim()
This commit is contained in:
@ -368,7 +368,7 @@ function snmpwalk_cache_oid($device, $oid, $array, $mib = null, $mibdir = null,
|
||||
foreach (explode("\n", $data) as $entry) {
|
||||
list($oid,$value) = explode('=', $entry, 2);
|
||||
$oid = trim($oid);
|
||||
$value = trim($value);
|
||||
$value = trim($value, '\" \\\n\r');
|
||||
list($oid, $index) = explode('.', $oid, 2);
|
||||
if (!strstr($value, 'at this OID') && isset($oid) && isset($index)) {
|
||||
$array[$index][$oid] = $value;
|
||||
|
Reference in New Issue
Block a user