From bc43f696caa8e092117f38ff6ecd034896b2332f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 3 Jun 2023 10:19:42 -0600 Subject: [PATCH] Bug fixed unset the cidr variable --- resources/cidr.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/cidr.php b/resources/cidr.php index 00efa89f0b..4e63f8b345 100644 --- a/resources/cidr.php +++ b/resources/cidr.php @@ -27,11 +27,14 @@ //check the domain cidr range if (isset($_SESSION['domain']["cidr"]) && !defined('STDIN')) { $found = false; - foreach($_SESSION['domain']["cidr"] as $cidr) { - if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) { - $found = true; - break; + if (!empty($_SESSION['domain']["cidr"])) { + foreach($_SESSION['domain']["cidr"] as $cidr) { + if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) { + $found = true; + break; + } } + unset($cidr); } if (!$found) { echo "access denied";