fix: function snmp_get delete quotes in snmp query (#7467)

* fix: ups-nut delete quotes in snmp query

* fix: ups-nut delete quotes in snmp query

* Update snmp.inc.php

* Update snmp.inc.php

* Update snmp.inc.php

* Update snmp.inc.php

* Update snmp.inc.php
This commit is contained in:
Martin Zatloukal 2017-10-31 22:50:18 +01:00 committed by Neil Lathwood
parent b2c5d069a7
commit 1dfcde3060

View File

@ -254,6 +254,7 @@ function snmp_get($device, $oid, $options = null, $mib = null, $mibdir = null)
$cmd = gen_snmpget_cmd($device, $oid, $options, $mib, $mibdir);
$data = trim(external_exec($cmd));
$data = trim($data, "\" \n\r");
recordSnmpStatistic('snmpget', $time_start);
if (is_string($data) && (preg_match('/(No Such Instance|No Such Object|No more variables left|Authentication failure)/i', $data))) {