Check Auth: Updates for PHP 8.1

This commit is contained in:
fusionate 2023-06-27 02:31:25 +00:00
parent a9bd6cbc9a
commit dec61c3833
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@
$result = $auth->validate();
//if not authorized
if (!$_SESSION['authorized']) {
if (empty($_SESSION['authorized']) || !$_SESSION['authorized']) {
//log the failed auth attempt to the system to the syslog server
openlog('FusionPBX', LOG_NDELAY, LOG_AUTH);
@ -66,7 +66,7 @@
closelog();
//redirect the user to the login page
$target_path = ($_REQUEST["path"] != '') ? $_REQUEST["path"] : $_SERVER["PHP_SELF"];
$target_path = !empty($_REQUEST["path"]) ? $_REQUEST["path"] : $_SERVER["PHP_SELF"];
message::add($text['message-authentication_failed'], 'negative');
header("Location: ".PROJECT_PATH."/?path=".urlencode($target_path));
exit;