summaryrefslogtreecommitdiffstats
path: root/modules-available/eventlog
diff options
context:
space:
mode:
authorSimon Rettberg2022-09-12 10:00:46 +0200
committerSimon Rettberg2022-09-12 10:00:46 +0200
commitee799051a8acd2df8d9131aa3d352c46d1c4fe28 (patch)
tree58ba049a31a5eb5ed3b2ea1a3622edbb759e91f8 /modules-available/eventlog
parent[eventlog] Keep sample log data a little longer (diff)
downloadslx-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.php5
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