From debe87aab1284eaf923b077568157be467e5218b Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Wed, 12 Mar 2014 12:30:56 +0100 Subject: [PATCH] Allow use of Perl metacharacters like [..] in application name. Thanks to Magnus Persson for the report. --- pgbadger | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pgbadger b/pgbadger index 9cb410a..bb11661 100755 --- a/pgbadger +++ b/pgbadger @@ -7905,7 +7905,7 @@ sub validate_log_line if ($#dbappname >= 0) { # Log line does not match the required dbname - if (!$prefix_vars{'t_appname'} || !grep(/^$prefix_vars{'t_appname'}$/i, @dbappname)) { + if (!$prefix_vars{'t_appname'} || !grep(/^\Q$prefix_vars{'t_appname'}\E$/i, @dbappname)) { return 0; } } @@ -7919,7 +7919,7 @@ sub validate_log_line if ($#exclude_appname >= 0) { # Log line matches the excluded appname - if ($prefix_vars{'t_appname'} && grep(/^$prefix_vars{'t_appname'}$/i, @exclude_appname)) { + if ($prefix_vars{'t_appname'} && grep(/^\Q$prefix_vars{'t_appname'}\E$/i, @exclude_appname)) { return 0; } } -- 2.40.0