mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Use boolean setting as true boolean (#7284)
* use boolean setting as true boolean * Update settings class to use the php filter_var function for boolean Using the built-in filter type for boolean seems like a better option as they are faster, already hardened, and more widely tested. I found this better method used originally by Mark J. Crane in 2022 in the content.php page so I included it here. * Update settings class to use the php filter_var function for boolean Using the built-in filter type for boolean seems like a better option as they are faster, already hardened, and more widely tested. I found this better method used originally by Mark J. Crane in 2022 in the content.php page so I included it here.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
//check for login return preference
|
||||
if (!empty($_SESSION["user_uuid"])) {
|
||||
if (isset($_SESSION['login']['destination_last']) && ($_SESSION['login']['destination_last']['boolean'] == 'true')) {
|
||||
if (isset($_SESSION['login']['destination_last']) && filter_var($_SESSION['login']['destination_last']['boolean'] ?? false, FILTER_VALIDATE_BOOL)) {
|
||||
if ($_SERVER['HTTP_REFERER'] != '') {
|
||||
//convert to relative path
|
||||
$referrer = substr($_SERVER['HTTP_REFERER'], strpos($_SERVER['HTTP_REFERER'], $_SERVER["HTTP_HOST"]) + strlen($_SERVER["HTTP_HOST"]));
|
||||
|
||||
Reference in New Issue
Block a user