From 67ea371cc9f7c1cd35155b2f88368b214eed1cfe Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Tue, 4 Aug 2020 19:32:18 +0100 Subject: [PATCH] :bug: Force remove headers before redirection Signed-off-by: Luke Tainton --- app/includes/header.php | 11 +++++++++++ app/includes/prereqs.php | 6 ++++++ app/public/new.php | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/includes/header.php b/app/includes/header.php index b89d0a3..0f0ba49 100644 --- a/app/includes/header.php +++ b/app/includes/header.php @@ -67,3 +67,14 @@ + +
+ + " . $alert['msg'] . " + + ") } + ?> +
diff --git a/app/includes/prereqs.php b/app/includes/prereqs.php index da8ea4f..b1399f3 100644 --- a/app/includes/prereqs.php +++ b/app/includes/prereqs.php @@ -22,6 +22,7 @@ if ($_ENV['OIDC_DISABLE_SSL'] == "true") { $oidc->setVerifyPeer(false); } + // Custom functions function oidc_set_vars($sub, $uid, $fname, $lname, $email) { $_SESSION['uuid'] = $sub; @@ -39,3 +40,8 @@ function is_signed_in() { return false; } } + +function create_alert($type, $msg) { + $thisAlert = array($type, $msg); + array_push($_SESSION['alerts'], $thisAlert); +} diff --git a/app/public/new.php b/app/public/new.php index 1ae22eb..1c379c1 100644 --- a/app/public/new.php +++ b/app/public/new.php @@ -44,7 +44,7 @@ echo("Error running SQL (Add new user):
" . $e->getMessage() . "
"); } - header_remove(); + header_remove("Location"); header('Location: /view?rid=' . $tkt_uuid); } ?>