From e6274720a75e27e93fb9e28c9f47acc792ea38da Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Fri, 4 Aug 2017 07:55:13 +0100 Subject: [PATCH] fix: Strip " and / from snmpwalk_cache_oid() (#7063) * fix: Strip " and / from snmpwalk_cache_oid() * updated trim() * Remove redundant trim() --- includes/snmp.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/snmp.inc.php b/includes/snmp.inc.php index 6ace362837..c39b5cc703 100644 --- a/includes/snmp.inc.php +++ b/includes/snmp.inc.php @@ -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;