Merge branch 'ent-13349-el-plugin-de-bandwidth-no-funciona-con-comunidad-con-caracteres-especiales' into 'develop'
Fix escape characters on community See merge request artica/pandorafms!7280
This commit is contained in:
commit
d0dcdf5dd4
|
@ -518,6 +518,9 @@ $filename =~ tr/./_/;
|
|||
$config->{'tmp_file'} = $filename.'.idx' if empty($config->{'tmp_file'});
|
||||
$config->{'log'} = $filename.'.log' if empty($config->{'log'});
|
||||
|
||||
# Escape special characters
|
||||
$config->{'community'} =~ s/([^\/\w])/\\$1/g;
|
||||
|
||||
# Check snmp connectivity
|
||||
my $sysobjectid = snmp_get({%{$config}, 'oid' => '.1.3.6.1.2.1.1.2.0'});
|
||||
|
||||
|
|
Loading…
Reference in New Issue