diff --git a/ncp-web/index.php b/ncp-web/index.php index 6f2001b6d..675b01dac 100644 --- a/ncp-web/index.php +++ b/ncp-web/index.php @@ -65,7 +65,7 @@ Error while loading localizations!

"); } @@ -287,7 +287,7 @@

__("NextcloudPi logs"); ?>

-
', file_get_contents('/var/log/ncp.log')) ?>
+
', htmlspecialchars(file_get_contents('/var/log/ncp.log'), ENT_QUOTES, 'UTF-8')) ?>
diff --git a/ncp-web/ncp-launcher.php b/ncp-web/ncp-launcher.php index 6a115045d..df0eede11 100644 --- a/ncp-web/ncp-launcher.php +++ b/ncp-web/ncp-launcher.php @@ -21,7 +21,7 @@ // require("L10N.php"); try { - $l = new L10N($_SERVER["HTTP_ACCEPT_LANGUAGE"], $l10nDir, $cfg_dir); + $l = new L10N(($_SERVER["HTTP_ACCEPT_LANGUAGE"] ?? ''), $l10nDir, $cfg_dir); } catch (Exception $e) { die(json_encode("

Error while loading localizations!

")); }