From 11568dc961c1fa7a511d27aca328944faa8a3992 Mon Sep 17 00:00:00 2001 From: Guillaume Bougard Date: Mon, 1 Oct 2018 18:49:32 +0200 Subject: [PATCH] fix: also cleanup final EOL --- lib/FusionInventory/Agent/Tools/SNMP.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/FusionInventory/Agent/Tools/SNMP.pm b/lib/FusionInventory/Agent/Tools/SNMP.pm index dd6e11e7a1..8f2c1eff4e 100644 --- a/lib/FusionInventory/Agent/Tools/SNMP.pm +++ b/lib/FusionInventory/Agent/Tools/SNMP.pm @@ -53,6 +53,9 @@ sub getCanonicalString { # truncate after first invalid character but keep newline as valid $value =~ s/[^\p{Print}\n].*$//; + # Finally cleanup EOL if some is remaining at the end + chomp($value); + return $value; }