fusionpbx/resources/cidr.php

19 lines
326 B
PHP
Raw Normal View History

2021-11-26 20:32:19 +01:00
<?php
//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;
}
}
?>