mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 03:09:21 +02:00
Fixed internal Filter parsing bug introduced in 3.2.2
Some filters, like generated by reports were not parsed correctly. This problem was introduced because of bug in the regex rules for splitting filters.
This commit is contained in:
parent
62ade11c50
commit
1184f93488
@ -598,11 +598,12 @@ abstract class LogStream {
|
||||
|
||||
if ( isset($szFilters) && strlen($szFilters) > 0 )
|
||||
{
|
||||
//OLD $tmpEntries = explode(" ", $szFilters);
|
||||
//OLD $tmpEntries = explode(" ", $szFilters);
|
||||
// Use RegEx for intelligent splitting
|
||||
$szFilterRgx = '/[,\s]++(?=(?:(?:[^"]*+"){2})*+[^"]*+$)(?=(?:(?:[^\']*+\'){2})*+[^\']*+$)(?=(?:[^()]*+\([^()]*+\))*+[^()]*+$)/x';
|
||||
$szFilterRgx = '/[\s]++(?=(?:(?:[^"]*+"){2})*+[^"]*+$)(?=(?:(?:[^\']*+\'){2})*+[^\']*+$)(?=(?:[^()]*+\([^()]*+\))*+[^()]*+$)/x';
|
||||
$tmpEntries = preg_split($szFilterRgx, $szFilters, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);
|
||||
//DEBUG print_r ( $tmpEntries );
|
||||
|
||||
foreach($tmpEntries as $myEntry)
|
||||
{
|
||||
// Continue if empty filter!
|
||||
|
Loading…
x
Reference in New Issue
Block a user