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:
Neil Lathwood
2017-08-04 07:55:13 +01:00
committed by GitHub
parent b8398d32b0
commit e6274720a7

View File

@ -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;