Skip to content

Commit

Permalink
fix: wrongly encoded fields during netdiscovery or netinventory tasks
Browse files Browse the repository at this point in the history
Closes #653
  • Loading branch information
g-bougard committed Apr 23, 2024
1 parent fd68f16 commit 8fab57a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ netdiscovery/netinventory:
meaning RemoteInventory was functionnal only if at least ping works or the
targeted computer was in the same network (arp works).
* Add support for Socomec PDU
* fix #653: Some values like LOCATION or CONTACT can be wrongly encoded

deploy:
* Force agent to run a partial software inventory after the deploy task is done
Expand Down
5 changes: 4 additions & 1 deletion lib/GLPI/Agent/Tools/SNMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use strict;
use warnings;
use base 'Exporter';

use Encode qw(decode);

use GLPI::Agent::Tools;

our @EXPORT = qw(
Expand Down Expand Up @@ -56,7 +58,8 @@ sub getCanonicalString {
# Finally cleanup EOL if some is remaining at the end
chomp($value);

return $value;
# Finally return decoded string
return decode('UTF-8', $value);
}

sub getCanonicalMacAddress {
Expand Down

0 comments on commit 8fab57a

Please sign in to comment.