From ee799051a8acd2df8d9131aa3d352c46d1c4fe28 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 12 Sep 2022 10:00:46 +0200 Subject: [eventlog] Remove serialized machine data from filtering logic This is "internal data subject to change", so don't tempt anybody. --- modules-available/eventlog/inc/filterruleprocessor.inc.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules-available/eventlog') diff --git a/modules-available/eventlog/inc/filterruleprocessor.inc.php b/modules-available/eventlog/inc/filterruleprocessor.inc.php index 2eb0c252..3c9b861f 100644 --- a/modules-available/eventlog/inc/filterruleprocessor.inc.php +++ b/modules-available/eventlog/inc/filterruleprocessor.inc.php @@ -83,6 +83,11 @@ class FilterRuleProcessor public static function applyFilterRules(string $type, array $data) { static $lastType; + // Kinda hacky - if there's a "data" key in the array, and it starts with '{', + // we assume it's the large machine hw info blob and discard it. + if (isset($data['data']) && $data['data'][0] === '{') { + unset($data['data']); + } if ($lastType !== $type) { $lastType = $type; $exists = Database::queryFirst("SELECT type -- cgit v1.2.3-55-g7522