From d62628d0d9042f520a4aaf210cafd7a8b39ddd7e Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Thu, 26 Jan 2023 17:04:57 +0100 Subject: [PATCH] verify return_uri is not empty for redirection --- Controllers/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controllers/UserController.php b/Controllers/UserController.php index e6742d0..b9795dd 100644 --- a/Controllers/UserController.php +++ b/Controllers/UserController.php @@ -27,7 +27,7 @@ final class UserController } private function redirectToPreviousPage(Array $A_postParams = null){ - if (isset($A_postParams["return_uri"])) { + if (isset($A_postParams["return_uri"]) && !empty($A_postParams["return_uri"])) { header("Location: ".$A_postParams["return_uri"]); } else { header("Location: /");