From 71fe655d73db79fa03e17e8e414568c8ea0f5842 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 30 Jul 2020 17:21:29 +0200 Subject: [serversetup-bwlp-ipxe/statistics] Sanitize strings from clients Some string from the clients might not be well suited for utf-8 representation. Add wrapper functions that clean utf-8 strings, or convert ANSI strings to UTF-8 while removing problematic chars. --- modules-available/serversetup-bwlp-ipxe/api.inc.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules-available/serversetup-bwlp-ipxe/api.inc.php') diff --git a/modules-available/serversetup-bwlp-ipxe/api.inc.php b/modules-available/serversetup-bwlp-ipxe/api.inc.php index c3804a03..7dc03e11 100644 --- a/modules-available/serversetup-bwlp-ipxe/api.inc.php +++ b/modules-available/serversetup-bwlp-ipxe/api.inc.php @@ -113,6 +113,7 @@ if ($model === false) { $model .= " ($manuf)"; } } + $model = Util::ansiToUtf8($model); // Some SMBIOSes contain corrupt/bogus strings } // Query if ($model !== false) { -- cgit v1.2.3-55-g7522