From c030cf2781c7bbef197db6f07facef35b6856c8e Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Fri, 1 Nov 2013 15:39:36 -0200 Subject: Restrict regex to only consider files to rotate, and ignore other params like key_file and cert_file. Fixes #3292 --- config/syslog-ng/syslog-ng.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/syslog-ng') diff --git a/config/syslog-ng/syslog-ng.inc b/config/syslog-ng/syslog-ng.inc index 75d5bb4d..e1b4d35e 100644 --- a/config/syslog-ng/syslog-ng.inc +++ b/config/syslog-ng/syslog-ng.inc @@ -235,7 +235,7 @@ function syslogng_get_log_files($objects) { foreach($objects as $object) { if($object['objecttype'] == 'destination') { - preg_match("/file\(['\"]([^'\"]*)['\"]/", base64_decode($object['objectparameters']), $match); + preg_match("/\bfile\b\(['\"]([^'\"]*)['\"]/", base64_decode($object['objectparameters']), $match); if($match) { $log_file = $match[1]; array_push($log_files, $log_file); @@ -433,4 +433,4 @@ EOD; conf_mount_rw(); write_rcfile($rc); } -?> \ No newline at end of file +?> -- cgit v1.2.3