From a7e65be09d9a8fb6a3c32da1fddf8191249852fd Mon Sep 17 00:00:00 2001 From: ottorei Date: Sat, 21 Nov 2020 06:13:59 +0200 Subject: [PATCH] Bugfix: SQL error with alerts search bar (#12329) * Fix SQL-error on search bar * restore escapes Co-authored-by: Tony Murray --- includes/html/table/alerts.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/html/table/alerts.inc.php b/includes/html/table/alerts.inc.php index a4c1cc36d6..6e81dfb9a3 100644 --- a/includes/html/table/alerts.inc.php +++ b/includes/html/table/alerts.inc.php @@ -60,7 +60,7 @@ if (! $show_recovered) { } if (isset($searchPhrase) && ! empty($searchPhrase)) { - $where .= ' AND (`timestamp` LIKE ? OR `rule` LIKE ? OR `name` LIKE ? OR `hostname` LIKE ? OR `sysName` LIKE ?)'; + $where .= ' AND (`alerts`.`timestamp` LIKE ? OR `rule` LIKE ? OR `name` LIKE ? OR `hostname` LIKE ? OR `sysName` LIKE ?)'; $param[] = "%$searchPhrase%"; $param[] = "%$searchPhrase%"; $param[] = "%$searchPhrase%";