updated
fixed domain url from config to prevent open redirect issue and encoded uri
This commit is contained in:
@@ -21,7 +21,7 @@ if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
|
||||
if($_SERVER["REQUEST_URI"] == "/")
|
||||
header("Location: login.php");
|
||||
else
|
||||
header("Location: login.php?url=".urlencode($_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]) );
|
||||
header("Location: login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -87,4 +87,3 @@ $num_notifications = $row['num'];
|
||||
//if ($session_user_config_force_mfa == 1 && $session_token == NULL) {
|
||||
// header("Location: force_mfa.php");
|
||||
//}
|
||||
|
||||
|
||||
@@ -218,8 +218,8 @@ if (isset($_POST['login'])) {
|
||||
//}
|
||||
|
||||
}
|
||||
if($_GET['url'])
|
||||
header("Location: ".$_GET['url']);
|
||||
if($_GET['last_visited'])
|
||||
header("Location: ".$_SERVER["REQUEST_SCHEME"] . "://" . $config_base_url . base64_decode($_GET['last_visited']) );
|
||||
else
|
||||
header("Location: $config_start_page");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user