fix(web): htmlspecialchars name & description

This commit is contained in:
Zack Spear
2023-09-07 14:54:45 -07:00
parent c5edef47e2
commit 68b1be7477
@@ -41,7 +41,7 @@ $serverState = [
"connectPluginInstalled" => $connectPluginInstalled,
"connectPluginVersion" => $connectPluginVersion,
"csrf" => $var['csrf_token'],
"description" => $var['COMMENT'] ?? '',
"description" => $var['COMMENT'] ? htmlspecialchars($var['COMMENT']) : '',
"deviceCount" => $var['deviceCount'],
"email" => $myservers['remote']['email'] ?? '',
"expireTime" => 1000 * (($var['regTy'] === 'Trial' || strstr($var['regTy'], 'expired')) ? $var['regTm2'] : 0),
@@ -56,7 +56,7 @@ $serverState = [
"lanIp" => ipaddr(),
"locale" => ($_SESSION['locale']) ? $_SESSION['locale'] : 'en_US',
"model" => $var['SYS_MODEL'],
"name" => $var['NAME'],
"name" => htmlspecialchars($var['NAME']),
"osVersion" => $var['version'],
"protocol" => $_SERVER['REQUEST_SCHEME'],
"regGen" => (int)$var['regGen'],