]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Special/HTTPException.php
Remove DI dependency from Module\Contact\Profile
[friendica.git] / src / Module / Special / HTTPException.php
index 9c9a29c55fd8c171b71a9eedc6cbaaf858f9d018..2cac142fca80e731f39ee2a499ba41d3b8acee5b 100644 (file)
@@ -104,6 +104,7 @@ class HTTPException
                                $tpl     = Renderer::getMarkupTemplate('http_status.tpl');
                                $content = Renderer::replaceMacros($tpl, $vars);
                        } catch (\Exception $e) {
+                               $vars = array_map('htmlentities', $vars);
                                $content = "<h1>{$vars['$title']}</h1><p>{$vars['$message']}</p>";
                                if ($this->isSiteAdmin) {
                                        $content .= "<p>{$vars['$thrown']}</p>";
@@ -125,8 +126,6 @@ class HTTPException
         */
        public function content(\Friendica\Network\HTTPException $e): string
        {
-               header($this->server['SERVER_PROTOCOL'] ?? 'HTTP/1.0' . ' ' . $e->getCode() . ' ' . $e->getDescription());
-
                if ($e->getCode() >= 400) {
                        $this->logger->debug('Exit with error',
                                [