From 2af07ae6913aad34924f119ed0bd9a0465e74d6f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 4 Dec 2018 11:54:35 +0100 Subject: [statistics] Filter malformed screen names --- modules-available/statistics/api.inc.php | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- cgit v1.2.3-55-g7522