2012-11-30 Hirofumi Kosaka <kosaka@rworks.jp>

* 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.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7212 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
hkosaka 2012-11-30 06:18:29 +00:00
parent db57ad130b
commit 65a347e005
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2012-11-30 Hirofumi Kosaka <kosaka@rworks.jp>
* 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 <rnovoa@artica.es>
* lib/PandoraFMS/NetworkServer.pm,

View File

@ -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;