diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index f6cfcb08..0289c4eb 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -5535,12 +5535,13 @@ if ($SSscript_remove_js > 0) # 210314-0919 - Added more enhanced_disconnect_logging options in System Settings # 210315-1730 - Added clear_form campaign option, Issue #1179 # 210315-2118 - Added new manual_dial_filter CALLBACK options, Issue #1139 +# 210316-0923 - Small fix for 2FA consistency # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-799a'; -$build = '210315-2118'; +$admin_version = '2.14-800a'; +$build = '210316-0923'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -5976,7 +5977,7 @@ $first_login_link=0; $VALID_2FA=1; # check for 2FA being active, and if so, see if there is a non-expired 2FA auth -if ( ($SStwo_factor_auth_hours > 0) and ($LOGtwo_factor_override != 'DISABLED') ) +if ( ($SStwo_factor_auth_hours > 0) and ($SStwo_factor_container != '') and ($SStwo_factor_container != '---DISABLED---') ) { $stmt="SELECT count(*) from vicidial_two_factor_auth where user='$PHP_AUTH_USER' and auth_stage='1' and auth_exp_date > NOW();"; $rslt=mysql_to_mysqli($stmt, $link); diff --git a/agc_2-X/trunk/www/vicidial/functions.php b/agc_2-X/trunk/www/vicidial/functions.php index aa035cca..c4192961 100644 --- a/agc_2-X/trunk/www/vicidial/functions.php +++ b/agc_2-X/trunk/www/vicidial/functions.php @@ -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';"; diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt index 09b4816e..f89387ab 100644 --- a/agc_2-X/trunk/www/vicidial/help_documentation.txt +++ b/agc_2-X/trunk/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20210315212201 +# version: 20210316091901 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage or the agent screen. Default is N. @@ -1121,7 +1121,7 @@ settings-mute_recordings Allow Mute Recordings This option if enabled allow settings-enable_auto_reports Enable Automated Reports This option if enabled allows you access to the Automated Reports section where you can set up reports to run at scheduled times and be delivered by email or FTP. Default is 0 for disabled. settings-first_login_trigger First Login Trigger This setting allows for the initial configuration of the server screen to be shown to the administrator when they first log into the system. settings-require_password_length User Password Minimum Length If set above 0, this setting will require that user passwords, phone and server passwords, and system settings default passwords be at least this minimum length of characters when those records settings are modified on the Modify pages. The most important factor in password security is the length of the password, and user passwords in this system can be up to 100 characters in length. Default is 0 for disabled. -settings-two_factor_auth_hours Two-Factor Auth Hours Two-Factor-Authentication, 2FA for short, adds a required second step to the login process through a method other than a password, such as an Email, Phone Call or Text-Message -SMS-. This 2FA Auth Hours field is where you define the number of hours each auth will last, or until the user logs out. Currently, 2FA is not available for agent screen logins. Default is 0 for 2FA disabled. +settings-two_factor_auth_hours Two-Factor Auth Hours Two-Factor-Authentication, 2FA for short, adds a required second step to the login process through a method other than a password, such as an Email, Phone Call or Text-Message -SMS-. This 2FA Auth Hours field is where you define the number of hours each auth will last, or until the user logs out. Currently, 2FA is not available for agent screen logins. Default is 0 for 2FA disabled. WARNING, if you enable this without properly configuring the 2FA settings container below, you will lock all users out of the admin web screens and a System Administrator will have to fix your system. settings-two_factor_container Two-Factor Auth Config Container Must be a valid 2FA_SETTINGS Container Type for 2FA to work. For more information on the settings that can be used in that container, please see the -2FA_TWO_FACTOR_AUTHENTICATION.txt- document. settings-user_account_emails User Login Link Emails Allowed The feature will allow you to click on a link from the User Modify page to send an email to an agent with a shortcut URL web address that will allow them to more easily log in to the agent screen. You can select options to send these emails with or without the user password included. Default is DISABLED. settings-phone_defaults_container Default Phones Settings Container This feature allows you to use a settings container of the type PHONE_DEFAULTS to pre-load numerous settings into the phone creation form and create new phones with these values pre-set. Refer to the PHONE_DEFAULTS settings container for an example of a container with all available settings that can be pre-set. Default is ---DISABLED---.