From fb9224d507d88635452470255095e2b11e28daa4 Mon Sep 17 00:00:00 2001 From: Ultra2D Date: Wed, 2 Mar 2016 16:19:32 +0100 Subject: [PATCH] Keep original behaviour, just prevent false matches --- includes/syslog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/syslog.php b/includes/syslog.php index 76ee7769f0..3c4980b385 100644 --- a/includes/syslog.php +++ b/includes/syslog.php @@ -107,7 +107,7 @@ function process_syslog($entry, $update) { $entry['program'] = 'Dovecot'; } // pam_krb5(sshd:auth): authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231 // pam_krb5[sshd:auth]: authentication failure; logname=root uid=0 euid=0 tty=ssh ruser= rhost=123.213.132.231 - else if (empty($entry['program']) and preg_match('#^(?P(.*((\(|\[).*(\)|\])))):(?P.*)$#', $entry['msg'], $matches)) { + else if (preg_match('#^(?P([^(:]+\([^)]+\)|[^\[:]+\[[^\]]+\])) ?: ?(?P.*)$#', $entry['msg'], $matches)) { $entry['msg'] = $matches['msg']; $entry['program'] = $matches['program']; } // SYSLOG CONNECTION BROKEN; FD='6', SERVER='AF_INET(123.213.132.231:514)', time_reopen='60'