diff options
author | Simon Rettberg | 2018-12-04 11:54:35 +0100 |
---|---|---|
committer | Simon Rettberg | 2018-12-04 11:54:35 +0100 |
commit | 2af07ae6913aad34924f119ed0bd9a0465e74d6f (patch) | |
tree | 047ff5ede90e242be453018e28f4f28ffdf5fd49 | |
parent | [locationinfo] add new settings for panels (counter, updaterate) (diff) | |
download | slx-admin-2af07ae6913aad34924f119ed0bd9a0465e74d6f.tar.gz slx-admin-2af07ae6913aad34924f119ed0bd9a0465e74d6f.tar.xz slx-admin-2af07ae6913aad34924f119ed0bd9a0465e74d6f.zip |
[statistics] Filter malformed screen names
-rw-r--r-- | modules-available/statistics/api.inc.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php index a7a636b3..8f5e9fd0 100644 --- a/modules-available/statistics/api.inc.php +++ b/modules-available/statistics/api.inc.php @@ -267,6 +267,10 @@ if ($type{0} === '~') { foreach ($screens as $port => $screen) { if (!array_key_exists('name', $screen)) continue; + // Filter bogus data + $screen['name'] = iconv('UTF-8', 'UTF-8//IGNORE', $screen['name']); + if (empty($screen['name'])) + continue; if (array_key_exists($screen['name'], $hwids)) { $hwid = $hwids[$screen['name']]; } else { |