修复调试模式下 $key 未编码导致的异常页面XSS问题

This commit is contained in:
Karson
2024-04-11 10:40:58 +08:00
parent 3883e15817
commit c79fdd579e

View File

@@ -68,7 +68,7 @@
break;
}
$result[] = is_int($key) ? $value : "'{$key}' => {$value}";
$result[] = is_int($key) ? $value : sprintf('\'%s\' => %s', htmlentities($key), $value);
}
return implode(', ', $result);