From f3928cba5f52708afe4133d678550c64bff6f7e0 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 27 Oct 2009 08:54:59 +0000 Subject: [PATCH] 2009-10-27 Miguel de Dios * include/functions_api.php: add in the function "isInACL" the posibility to no filter if set in ACL the character "*". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2054 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/functions_api.php | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c948cb15c9..9be240fb5b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-10-27 Miguel de Dios + + * include/functions_api.php: add in the function "isInACL" the posibility + to no filter if set in ACL the character "*". + 2009-10-26 Ramon Novoa * extensions/update_manager.php, diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index f4f2ae114b..b96481f658 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -129,6 +129,10 @@ function returnData($returnType, $data, $separator = ';') { function isInACL($ip) { global $config; + //If set * in the list ACL return true + if(in_array('*', $config['list_ACL_IPs_for_API'])) + return true; + if (in_array($ip, $config['list_ACL_IPs_for_API'])) return true; else