From 7699b250bf0547a089c5e1a5a9d5d424258208db Mon Sep 17 00:00:00 2001 From: Kike Date: Mon, 31 Aug 2020 10:37:52 +0200 Subject: [PATCH] Issue with snmpv3 passwords --- pandora_server/util/plugin/snmp_remote.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pandora_server/util/plugin/snmp_remote.pl b/pandora_server/util/plugin/snmp_remote.pl index 62fa4cedc0..040de876bb 100755 --- a/pandora_server/util/plugin/snmp_remote.pl +++ b/pandora_server/util/plugin/snmp_remote.pl @@ -187,11 +187,11 @@ unless ($host){ #----------------------------------------------------------------------- my $command_line_parameters; if ($version == "3") { - if ($security_level eq 'authNoPriv') { - $command_line_parameters = "-v $version -u $user -a $auth_method -A $pass -l $security_level $host"; + if (lc($security_level) eq lc('authNoPriv')) { + $command_line_parameters = "-v $version -u $user -a $auth_method -A '$pass' -l $security_level $host"; } - elsif ($security_level eq "AuthPriv") { - $command_line_parameters = "-v $version -u $user -a $auth_method -A $pass -l $security_level -x $privacy_method -X $privacy_pass $host"; + elsif (lc($security_level) eq lc("AuthPriv")) { + $command_line_parameters = "-v $version -u $user -a $auth_method -A '$pass' -l $security_level -x $privacy_method -X '$privacy_pass' $host"; } else { $command_line_parameters = "-v $version -u $user -l $security_level $host";