diff options
author | Simon Rettberg | 2022-09-12 10:00:46 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-09-12 10:00:46 +0200 |
commit | ee799051a8acd2df8d9131aa3d352c46d1c4fe28 (patch) | |
tree | 58ba049a31a5eb5ed3b2ea1a3622edbb759e91f8 /modules-available/eventlog | |
parent | [eventlog] Keep sample log data a little longer (diff) | |
download | slx-admin-ee799051a8acd2df8d9131aa3d352c46d1c4fe28.tar.gz slx-admin-ee799051a8acd2df8d9131aa3d352c46d1c4fe28.tar.xz slx-admin-ee799051a8acd2df8d9131aa3d352c46d1c4fe28.zip |
[eventlog] Remove serialized machine data from filtering logic
This is "internal data subject to change", so don't tempt anybody.
Diffstat (limited to 'modules-available/eventlog')
-rw-r--r-- | modules-available/eventlog/inc/filterruleprocessor.inc.php | 5 |
1 files changed, 5 insertions, 0 deletions
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 |