Upgrade to 3.6.1

This commit is contained in:
Bastian Allgeier
2021-12-07 12:39:37 +01:00
parent 9fc43ea22c
commit 70b8439c49
134 changed files with 19987 additions and 1100 deletions

View File

@@ -92,6 +92,9 @@ class Server
*/
public static function sanitize(string $key, $value)
{
// make sure $value is not null
$value ??= '';
switch ($key) {
case 'SERVER_ADDR':
case 'SERVER_NAME':
@@ -100,7 +103,7 @@ class Server
$value = strip_tags($value);
$value = preg_replace('![^\w.:-]+!iu', '', $value);
$value = trim($value, '-');
$value = htmlspecialchars($value);
$value = htmlspecialchars($value, ENT_COMPAT);
break;
case 'SERVER_PORT':
case 'HTTP_X_FORWARDED_PORT':