Skip to content

Commit

Permalink
Fix issue klaubert#43 where an "not tag" filter cause processing error.
Browse files Browse the repository at this point in the history
  • Loading branch information
klaubert committed Jul 13, 2014
1 parent 8fca051 commit 5a29416
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -43,6 +43,8 @@ Bug: This change addresses the issue 43 at
http://code.google.com/p/waf-fle/issues/. It reflects problem with
parsing of the modsec index file line where is empty or malformed
Host header. Patch from Juraj Sakala
Bug: fixed issue #43, when processing filter with "not tag" generate an
error.
Bug: Issue #45, unescaped output on TopRules chart, make chart unusable
with special character in rule description. Thanks to Ibere Tizio,
by report and propose a fix.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1028,6 +1028,8 @@ function superFilter($selector, $trailer, $filterType, $count = FALSE, $extraFie
if (isset($_SESSION[$filterType]['tag']) AND !isset($_SESSION[$filterType]['ruleid'])) {
if (!isset($_SESSION[$filterType]['Not_tag'])) {
$sql = $sql . ' JOIN events_messages ON events.event_id = events_messages.event_id JOIN events_messages_tag ON events_messages_tag.msg_id = events_messages.msg_id ';
}else {
$sql = $sql . ' JOIN events_messages ON events.event_id = events_messages.event_id ';
}
}

@@ -1366,8 +1368,6 @@ function superFilter($selector, $trailer, $filterType, $count = FALSE, $extraFie
// Concatenate selector and trailer
$sql = $sql . $trailer;

//print "$sql <br />";

if ($DEBUG) {
$debugInfo[__FUNCTION__][$debugCount]['query'] = $sql;
}

0 comments on commit 5a29416

Please sign in to comment.