From 3ee97e0d76bc560d9e384e908288a5ff34e1ccb5 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 27 Jul 2022 13:40:55 -0600 Subject: [PATCH] Add more debug information. --- app/switch/resources/service/event_guard.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/switch/resources/service/event_guard.php b/app/switch/resources/service/event_guard.php index b9e26e3bbd..20cfca1654 100644 --- a/app/switch/resources/service/event_guard.php +++ b/app/switch/resources/service/event_guard.php @@ -92,6 +92,10 @@ } } +//test a specific address + //$ip_address = '10.7.0.253'; + //$result = access_allowed($ip_address); + //get the settings //$setting_name = $_SESSION['category']['subcategory']['text']; @@ -132,7 +136,6 @@ //debug info if ($debug) { - echo "possible hacker\n"; echo "network-ip ".$array['network-ip']."\n"; echo "to-host ".$array['to-host']."\n"; echo "\n"; @@ -417,7 +420,16 @@ //use the ip address to get the authorized nodes foreach($allowed_nodes as $row) { if (check_cidr($row['node_cidr'], $ip_address)) { + //debug info + if ($debug) { + print_r($row); + echo $ip_address."\n"; + } + + //set the allowed to true $allowed = true; + + //exit the loop break; } }