Added IP Lists feature, allowing creating of lists of IP Addresses that can

be used as whitelists on a User Group basis for Agent, Admin and API
 web resources.

git-svn-id: svn://192.168.202.10@2726 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2017-04-10 02:30:33 +00:00
parent c82912ac38
commit 784c71bd4a
138 changed files with 2233 additions and 387 deletions
+9 -1
View File
@@ -33,6 +33,7 @@
# 150727-2158 - Enabled user features for hiding phone numbers and lead data
# 150903-1538 - Added compatibility for custom fields data options
# 170306-0858 - Added proper report URL logging
# 170409-1556 - Added IP List validation code
#
$startMS = microtime();
@@ -108,7 +109,7 @@ if ($sl_ct > 0)
}
$auth=0;
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1);
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'',1,0);
if ($auth_message == 'GOOD')
{$auth=1;}
@@ -122,6 +123,13 @@ if ($auth < 1)
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
if ($auth_message == 'IPBLOCK')
{
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
Header ("Content-type: text/html; charset=utf-8");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
exit;
}
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
Header("HTTP/1.0 401 Unauthorized");
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";