mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-13 06:35:00 +00:00
Create cidr.php
This commit is contained in:
18
resources/cidr.php
Normal file
18
resources/cidr.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user