Small fix for 2FA consistency, added a Warning to the HELP for 2FA
git-svn-id: svn://192.168.202.10@3385 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
# 191013-0901 - Fixes for PHP7
|
||||
# 200401-1920 - Added TimeToText function to convert integers to strings
|
||||
# 210311-2316 - Added 2FA check in user_authorization function
|
||||
# 210316-0924 - Small fix for 2FA consistency
|
||||
#
|
||||
|
||||
##### BEGIN validate user login credentials, check for failed lock out #####
|
||||
@@ -46,7 +47,7 @@ function user_authorization($user,$pass,$user_option,$user_update,$api_call)
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,webroot_writable,pass_hash_enabled,pass_key,pass_cost,allow_ip_lists,system_ip_blacklist,two_factor_auth_hours FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,webroot_writable,pass_hash_enabled,pass_key,pass_cost,allow_ip_lists,system_ip_blacklist,two_factor_auth_hours,two_factor_container FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
@@ -61,6 +62,7 @@ function user_authorization($user,$pass,$user_option,$user_update,$api_call)
|
||||
$SSallow_ip_lists = $row[5];
|
||||
$SSsystem_ip_blacklist = $row[6];
|
||||
$SStwo_factor_auth_hours = $row[7];
|
||||
$SStwo_factor_container = $row[8];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
@@ -218,7 +220,7 @@ function user_authorization($user,$pass,$user_option,$user_update,$api_call)
|
||||
}
|
||||
$auth_key='GOOD';
|
||||
|
||||
if ( ($SStwo_factor_auth_hours > 0) and ($php_script != 'admin.php') )
|
||||
if ( ($SStwo_factor_auth_hours > 0) and ($SStwo_factor_container != '') and ($SStwo_factor_container != '---DISABLED---') and ($php_script != 'admin.php') )
|
||||
{
|
||||
$VUtwo_factor_override='';
|
||||
$stmt="SELECT two_factor_override from vicidial_users where user='$user';";
|
||||
|
||||
Reference in New Issue
Block a user