From 8855fdc83447ccf550803f0e9eee803956a07925 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 22 Oct 2025 14:19:39 -0600 Subject: [PATCH] Update the settings domain cidr Replace $_SESSION['domain']['cidr'] with settings->get('domain', 'cidr') --- resources/cidr.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/cidr.php b/resources/cidr.php index 4e63f8b345..33218278fe 100644 --- a/resources/cidr.php +++ b/resources/cidr.php @@ -17,24 +17,25 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 20018-2021 + Portions created by the Initial Developer are Copyright (C) 20018-2025 the Initial Developer. All Rights Reserved. Contributor(s): Mark J Crane */ -//check the domain cidr range - if (isset($_SESSION['domain']["cidr"]) && !defined('STDIN')) { +//check the domain cidr range + global $settings; + if (!defined('STDIN') && !empty($settings->get('domain', 'cidr'))) { $found = false; - if (!empty($_SESSION['domain']["cidr"])) { - foreach($_SESSION['domain']["cidr"] as $cidr) { + $cidr_array = $settings->get('domain', 'cidr'); + if (!empty($cidr_array)) { + foreach($cidr_array as $cidr) { if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) { $found = true; break; } } - unset($cidr); } if (!$found) { echo "access denied";