Added several security changes to the agent interface, including freezing a user's account for 15 minutes after 10 failed login attempts.
Changed all of the admin scripts from using the PHP ereg functions to preg. This is a requirement for moving to PHP6 where ereg functions are depricated. This will also have the benefit of speeding up those scripts because preg is supposed to be more efficient and faster than ereg. Added recording_id to the available fields for the dispo call url feature Added pause code to the agent_status non-agent api function output git-svn-id: svn://192.168.202.10@1994 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
# 121214-2300 - First Build
|
||||
# 130127-0027 - Better non-latin characters support
|
||||
# 130328-0007 - Converted ereg to preg functions
|
||||
# 130603-2210 - Added login lockout for 15 minutes after 10 failed logins, and other security fixes
|
||||
#
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -130,14 +131,12 @@ if (!isset($format)) {$format="text";}
|
||||
if (!isset($ACTION)) {$ACTION="refresh";}
|
||||
if (!isset($query_date)) {$query_date = $NOW_DATE;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 0;";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$auth=$row[0];
|
||||
$auth=0;
|
||||
$auth_message = user_authorization($user,$pass,'',0);
|
||||
if ($auth_message == 'GOOD')
|
||||
{$auth=1;}
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and modify_leads='1';";
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and modify_leads='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
@@ -151,7 +150,7 @@ $LVAactive=$row[0];
|
||||
$LVAactive=9;
|
||||
if ( (strlen($user)<2) or (strlen($pass)<2) or ($auth==0) or ( ($LVAactive < 1) ) )
|
||||
{
|
||||
echo "Invalid Username/Password: |$user|$pass|\n";
|
||||
echo "Invalid Username/Password: |$user|$pass|$auth_message|\n";
|
||||
echo "<form action=./vdc_email_display.php method=POST name=email_display_form id=email_display_form>\n";
|
||||
echo "<input type=hidden name=user id=user value=\"$user\">\n";
|
||||
echo "</form>\n";
|
||||
|
||||
Reference in New Issue
Block a user