From 750177a51d16cb3ee1d8e0408e0669a02006b09c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Fri, 26 Nov 2021 12:35:45 -0700 Subject: [PATCH] Remove cidr from the pdo.php file. This was an awkward place for this code so moved it into its own include. --- resources/pdo.php | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/resources/pdo.php b/resources/pdo.php index fbf18c265f..a165a3735b 100644 --- a/resources/pdo.php +++ b/resources/pdo.php @@ -347,35 +347,4 @@ if ($db_type == "pgsql") { $domain_uuid = uuid(); } -//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 (!$found) { - echo "access denied"; - exit; - } - } - -//check the api cidr range - if (isset($_SESSION['api']["cidr"])) { - $found = false; - foreach($_SESSION['api']["cidr"] as $cidr) { - if (check_cidr($cidr, $_SERVER['REMOTE_ADDR'])) { - $found = true; - break; - } - } - if (!$found) { - unset ($_REQUEST['key']); - unset ($_POST['key']); - unset ($_GET['key']); - } - } - ?>