diff --git a/resources/lib/UnityHTTPD.php b/resources/lib/UnityHTTPD.php index b4e7b7e21..a22d328b4 100644 --- a/resources/lib/UnityHTTPD.php +++ b/resources/lib/UnityHTTPD.php @@ -99,11 +99,11 @@ public static function gracefulDie( } // text may not be shown in the webpage in an obvious way, so make a popup self::alert(implode(" -- ", [$title, ...$body_paragraphs])); - echo sprintf( - "

%s

\n%s\n", - htmlspecialchars($title), - implode("\n
\n", $body_paragraphs), - ); + printf("

%s

\n", htmlspecialchars($title)); + foreach ($body_paragraphs as $p) { + printf("%s\n
\n", htmlspecialchars($p)); + } + printf("Go to Home\n
\n", getRelativeURL("/index.php")); // display_errors should not be enabled in production if ( !is_null($error) && diff --git a/webroot/panel/pi.php b/webroot/panel/pi.php index e6ca7f351..052792941 100644 --- a/webroot/panel/pi.php +++ b/webroot/panel/pi.php @@ -20,7 +20,7 @@ $group = $USER->getPIGroup(); $user_is_owner = true; if (!$group->exists()) { - UnityHTTPD::badRequest("not a PI", "You are not a PI."); + UnityHTTPD::forbidden("not a PI", "You are not a PI."); } }