mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Prevent non-unicode characters in ifAlias (#15585)
non-unicode characters will show up oddly, but at least they won't cause an error.
This commit is contained in:
@@ -678,6 +678,7 @@ foreach ($ports as $port) {
|
||||
} else {
|
||||
$current_oid = \LibreNMS\Util\StringHelpers::inferEncoding($this_port['ifAlias']);
|
||||
}
|
||||
$current_oid = utf8_encode($current_oid); // prevent invalid non-utf8 characters
|
||||
}
|
||||
if ($oid == 'ifSpeed') {
|
||||
$ifSpeed_override = DeviceCache::getPrimary()->getAttrib('ifSpeed:' . $port['ifName']);
|
||||
|
Reference in New Issue
Block a user