summaryrefslogtreecommitdiffstats
path: root/modules-available/statistics/inc
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-17 14:33:15 +0200
committerSimon Rettberg2022-05-17 14:33:15 +0200
commit60bec31a9aabf43d8a6f13d1d7d1f4d0eccf5de4 (patch)
tree036a5e7f2cf3b465d1081000081374b550c0608a /modules-available/statistics/inc
parent[statistics] Add missing !== false check to query result (diff)
downloadslx-admin-60bec31a9aabf43d8a6f13d1d7d1f4d0eccf5de4.tar.gz
slx-admin-60bec31a9aabf43d8a6f13d1d7d1f4d0eccf5de4.tar.xz
slx-admin-60bec31a9aabf43d8a6f13d1d7d1f4d0eccf5de4.zip
[statistics] Make sure hwname and devpath get valid ASCII only
Diffstat (limited to 'modules-available/statistics/inc')
-rw-r--r--modules-available/statistics/inc/hardwareparser.inc.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules-available/statistics/inc/hardwareparser.inc.php b/modules-available/statistics/inc/hardwareparser.inc.php
index 95b8e31e..b9d1c13b 100644
--- a/modules-available/statistics/inc/hardwareparser.inc.php
+++ b/modules-available/statistics/inc/hardwareparser.inc.php
@@ -163,6 +163,7 @@ class HardwareParser
private static function writeLocalHardwareData(string $uuid, int $hwid, string $pathId, array $props): int
{
// Add mapping between hw entity and machine
+ $pathId = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $pathId);
$mappingId = Database::insertIgnore('machine_x_hw', 'machinehwid',
['hwid' => $hwid, 'machineuuid' => $uuid, 'devpath' => $pathId],
['disconnecttime' => 0]);