diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index b3d258ad45..361f8e9d54 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,11 @@ +2012-11-30 Hirofumi Kosaka + + * lib/PandoraFMS/SNMPServer.pm: Added missing safe_output() + for trap filters. This fixed a bug that a backslash could not + escape its following character. + + Merged from 4.0 branch. + 2012-11-28 Ramon Novoa * lib/PandoraFMS/NetworkServer.pm, diff --git a/pandora_server/lib/PandoraFMS/SNMPServer.pm b/pandora_server/lib/PandoraFMS/SNMPServer.pm index 26c9bd9e7d..cf155f143d 100644 --- a/pandora_server/lib/PandoraFMS/SNMPServer.pm +++ b/pandora_server/lib/PandoraFMS/SNMPServer.pm @@ -238,7 +238,7 @@ sub matches_filter ($$$) { # Get filters my @filters = get_db_rows ($dbh, 'SELECT filter FROM tsnmp_filter'); foreach my $filter (@filters) { - my $regexp = $filter->{'filter'}; + my $regexp = safe_output($filter->{'filter'}) ; if ($string =~ m/$regexp/i) { logger($pa_config, "Trap '$string' matches filter '$regexp'. Discarding...", 10); return 1;