Fix string quoting in snmp trim (#7120)

This commit is contained in:
Tony Murray
2017-08-04 08:03:03 -05:00
committed by GitHub
parent e6274720a7
commit 0d36244eda

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, '\" \\\n\r');
$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;