\n";
@@ -9666,11 +9671,17 @@ if ($ADD=="2")
{
$user = 'AUTOGENERA';
}
- if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or ( (strlen($user) > 20) and (!preg_match('/AUTOGENERA/',$user)) ) )
+ if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or ( (strlen($user) > 20) and (!preg_match('/AUTOGENERA/',$user)) ) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) )
{
echo " "._QXZ("USER NOT ADDED - Please go back and look at the data you entered")."\n";
echo " "._QXZ("user id must be between 2 and 20 characters long")."\n";
- echo " "._QXZ("full name and password must be at least 2 characters long")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("full name must be at least 2 characters long")."\n";
+ echo " "._QXZ("password must be at least $SSrequire_password_length characters long")."\n";
+ }
+ else
+ {echo " "._QXZ("full name and password must be at least 2 characters long")."\n";}
echo " "._QXZ("you must select a user group")."\n";
}
else
@@ -9977,11 +9988,17 @@ if ($ADD=="2A")
{echo " "._QXZ("USER NOT ADDED - there is already a user in the system with this user number")."\n";}
else
{
- if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 20) )
+ if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 20) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) )
{
echo " "._QXZ("USER NOT ADDED - Please go back and look at the data you entered")."\n";
echo " "._QXZ("user id must be between 2 and 20 characters long")."\n";
- echo " "._QXZ("full name and password must be at least 2 characters long")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("full name must be at least 2 characters long")."\n";
+ echo " "._QXZ("password must be at least $SSrequire_password_length characters long")."\n";
+ }
+ else
+ {echo " "._QXZ("full name and password must be at least 2 characters long")."\n";}
echo "\n";
}
else
@@ -12585,10 +12602,14 @@ if ($ADD==21111111111)
{echo " "._QXZ("PHONE NOT ADDED - there is already a Voicemail ID in the system with this ID")."\n";}
else
{
- if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1))
+ if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($conf_secret)) ))
{
echo " "._QXZ("PHONE NOT ADDED - Please go back and look at the data you entered")."\n";
echo " "._QXZ("The following fields must have data").": extension, server_ip, dialplan_number, voicemail_id, login, pass\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("registration password must be at least $SSrequire_password_length characters long")."\n";
+ }
}
else
{
@@ -13722,10 +13743,17 @@ if ($ADD=="4A")
{
echo "";
- if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) )
+ $enc_pass_nochange=0;
+ if ( ($SSpass_hash_enabled > 0) and (strlen($pass) < 1) ) {$enc_pass_nochange=1;}
+
+ if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) and ($enc_pass_nochange < 1) ) )
{
echo " "._QXZ("USER NOT MODIFIED - Please go back and look at the data you entered")."\n";
echo " "._QXZ("Password and Full Name each need to be at least 2 characters in length")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("Password must be at least $SSrequire_password_length characters long")."\n";
+ }
}
else
{
@@ -14014,10 +14042,17 @@ if ($ADD=="4B")
{
echo "";
- if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) )
+ $enc_pass_nochange=0;
+ if ( ($SSpass_hash_enabled > 0) and (strlen($pass) < 1) ) {$enc_pass_nochange=1;}
+
+ if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) and ($enc_pass_nochange < 1) ) )
{
echo " "._QXZ("USER NOT MODIFIED - Please go back and look at the data you entered")."\n";
echo " "._QXZ("Password and Full Name each need to be at least 2 characters in length")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("Password must be at least $SSrequire_password_length characters long")."\n";
+ }
}
else
{
@@ -14297,10 +14332,17 @@ if ($ADD==4)
{
echo "";
- if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) )
+ $enc_pass_nochange=0;
+ if ( ($SSpass_hash_enabled > 0) and (strlen($pass) < 1) ) {$enc_pass_nochange=1;}
+
+ if ( ( (strlen($pass) < 2) and ($SSpass_hash_enabled < 1) ) or (strlen($full_name) < 2) or (strlen($user_level) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) and ($enc_pass_nochange < 1) ) )
{
echo " "._QXZ("USER NOT MODIFIED - Please go back and look at the data you entered")."\n";
echo " "._QXZ("Password and Full Name each need to be at least 2 characters in length")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("Password must be at least $SSrequire_password_length characters long")."\n";
+ }
}
else
{
@@ -16909,8 +16951,14 @@ if ($ADD==41111111111)
{echo " "._QXZ("PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server")."\n";}
else
{
- if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1))
- {echo " "._QXZ("PHONE NOT MODIFIED - Please go back and look at the data you entered")."\n";}
+ if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($conf_secret)) ))
+ {
+ echo " "._QXZ("PHONE NOT MODIFIED - Please go back and look at the data you entered")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("registration password must be at least $SSrequire_password_length characters long")."\n";
+ }
+ }
else
{
$stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';";
@@ -17055,8 +17103,14 @@ if ($ADD==411111111111)
{echo " "._QXZ("SERVER NOT MODIFIED - there is already a server in the system with this")." server_ip\n";}
else
{
- if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) )
- {echo " "._QXZ("SERVER NOT MODIFIED - Please go back and look at the data you entered")."\n";}
+ if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($conf_secret)) ) )
+ {
+ echo " "._QXZ("SERVER NOT MODIFIED - Please go back and look at the data you entered")."\n";
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("Conf File Secret must be at least $SSrequire_password_length characters long")."\n";
+ }
+ }
else
{
if (preg_match("/_MXCS/",$SShosted_settings))
@@ -18161,102 +18215,110 @@ if ($ADD==411111111111111)
{
echo "";
- echo " "._QXZ("SYSTEM SETTINGS MODIFIED")."\n";
-
- $k=0;
- if (is_array($reports_use_slave_db)) {$multi_count = count($reports_use_slave_db);} else {$multi_count=0;}
- $multi_array = $reports_use_slave_db;
- while ($k < $multi_count)
+ if ( ($SSrequire_password_length > 0) and ( ($SSrequire_password_length > strlen($default_phone_registration_password)) or ( ($SSrequire_password_length > strlen($default_phone_login_password)) or ( ($SSrequire_password_length > strlen($default_server_password)) ) ) ) )
{
- $new_field_value .= "$multi_array[$k],";
- $k++;
+ echo " "._QXZ("SYSTEM SETTINGS NOT MODIFIED - Please go back and look at the data you entered")."\n";
+ echo " "._QXZ("The default passwords must be at least $SSrequire_password_length characters long")."\n";
}
- $reports_use_slave_db = preg_replace("/,$/","",$new_field_value);
-
- $m=0;
- if (is_array($tables_use_alt_log_db)) {$altlog_count = count($tables_use_alt_log_db);} else {$altlog_count=0;}
- $altlog_array = $tables_use_alt_log_db;
- while ($m < $altlog_count)
+ else
{
- $new_altlog_value .= "$altlog_array[$m],";
- $m++;
- }
- $tables_use_alt_log_db = preg_replace("/,$/","",$new_altlog_value);
+ echo " "._QXZ("SYSTEM SETTINGS MODIFIED")."\n";
- $custom_dialplanSQL='';
- if ($LOGmodify_custom_dialplans > 0)
- {$custom_dialplanSQL = ",custom_dialplan_entry='$custom_dialplan_entry'";}
-
- $custom_stmt="show tables like 'vicidial_custom_reports'";
- $custom_rslt=mysql_to_mysqli($custom_stmt, $link);
- $custom_reports_slave_SQL='';
- if (mysqli_num_rows($custom_rslt)>0)
- {
- if (is_array($custom_reports_use_slave_db))
+ $k=0;
+ if (is_array($reports_use_slave_db)) {$multi_count = count($reports_use_slave_db);} else {$multi_count=0;}
+ $multi_array = $reports_use_slave_db;
+ while ($k < $multi_count)
{
- for ($q=0; $q 0)
+ {$custom_dialplanSQL = ",custom_dialplan_entry='$custom_dialplan_entry'";}
+
+ $custom_stmt="show tables like 'vicidial_custom_reports'";
+ $custom_rslt=mysql_to_mysqli($custom_stmt, $link);
+ $custom_reports_slave_SQL='';
+ if (mysqli_num_rows($custom_rslt)>0)
+ {
+ if (is_array($custom_reports_use_slave_db))
{
- $custom_reports_slave_SQL.=$custom_reports_use_slave_db[$q].",";
+ for ($q=0; $q0)
+ {
+ if ($outbound_calls_per_second > $maxcps_set)
+ {
+ if ($DB > 0) {echo "MAX CPS: |$outbound_calls_per_second|$maxcps_set|\n";}
+ $outbound_calls_per_second = $maxcps_set;
+ }
}
}
- if (preg_match('/\-\-NONE\-\-/i', $custom_reports_slave_SQL))
+
+ $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='$chat_url',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist',agent_push_events='$agent_push_events',agent_push_url='$agent_push_url',hide_inactive_lists='$hide_inactive_lists',allow_manage_active_lists='$allow_manage_active_lists',expired_lists_inactive='$expired_lists_inactive',did_system_filter='$did_system_filter',anyone_callback_inactive_lists='$anyone_callback_inactive_lists',enable_gdpr_download_deletion='$enable_gdpr_download_deletion',source_id_display='$source_id_display',agent_logout_link='$agent_logout_link',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings',user_admin_redirect='$user_admin_redirect',list_status_modification_confirmation='$list_status_modification_confirmation',sip_event_logging='$sip_event_logging',call_quota_lead_ranking='$call_quota_lead_ranking',enable_second_script='$enable_second_script',enable_first_webform='$enable_first_webform',recording_buttons='$recording_buttons',opensips_cid_name='$opensips_cid_name',require_password_length='$require_password_length'$custom_dialplanSQL;";
+ $rslt=mysql_to_mysqli($stmt, $link);
+
+ if ( ($meetme_enter_login_filename != $SSmeetme_enter_login_filename) or ($meetme_enter_leave3way_filename != $SSmeetme_enter_leave3way_filename) )
+ {$reload_dialplan_on_servers=1;}
+
+ if ($reload_dialplan_on_servers > 0)
{
- $custom_reports_slave_SQL='';
+ $stmtB="UPDATE system_settings set reload_timestamp=NOW();";
+ $rslt=mysql_to_mysqli($stmtB, $link);
+
+ $stmtC="UPDATE servers set rebuild_conf_files='Y' where active='Y' and active_asterisk_server='Y' and generate_vicidial_conf='Y';";
+ $rslt=mysql_to_mysqli($stmtC, $link);
}
- $custom_reports_slave_SQL=substr($custom_reports_slave_SQL,0,-1);
- $custom_reports_slave_SQL=",custom_reports_use_slave_db='$custom_reports_slave_SQL'";
- }
- $stmt="SELECT count(*) from servers where active='Y' and active_asterisk_server='Y';";
- $rslt=mysql_to_mysqli($stmt, $link);
- $row=mysqli_fetch_row($rslt);
- $active_asterisk_servers = $row[0];
- if ($row[0] < 1) {$row[0] = '1';}
- if (preg_match("/_MXCS/",$SShosted_settings))
- {
- $maxcps_set = $SShosted_settings;
- $maxcps_set = preg_replace("/MXAG\d+|_BUILD_|DRA|_MXTR\d+|.*_MXCS| /",'',$maxcps_set);
- $maxcps_set = preg_replace('/[^0-9]/','',$maxcps_set);
- $maxcps_set = ($maxcps_set * $row[0]);
- if (strlen($maxcps_set)>0)
+
+ $update_gdpr_users_stmt="update vicidial_users set export_gdpr_leads='$enable_gdpr_download_deletion' where export_gdpr_leads>$enable_gdpr_download_deletion";
+ $update_gdpr_users_rslt=mysql_to_mysqli($update_gdpr_users_stmt, $link);
+ $update_gdpr_rows=mysqli_affected_rows($link);
+ if ($update_gdpr_rows>0)
{
- if ($outbound_calls_per_second > $maxcps_set)
- {
- if ($DB > 0) {echo "MAX CPS: |$outbound_calls_per_second|$maxcps_set|\n";}
- $outbound_calls_per_second = $maxcps_set;
- }
+ $event_notes="$update_gdpr_rows "._QXZ("GDPR-enabled users downgraded due to setting change");
}
+
+ ### LOG INSERTION Admin Log Table ###
+ $SQL_log = "$stmt|$stmtB|$stmtC|";
+ $SQL_log = preg_replace('/;/', '', $SQL_log);
+ $SQL_log = addslashes($SQL_log);
+ $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SYSTEMSETTINGS', event_type='MODIFY', record_id='system_settings', event_code='ADMIN MODIFY SYSTEM SETTINGS', event_sql=\"$SQL_log\", event_notes='$event_notes';";
+ if ($DB) {echo "|$stmt|\n";}
+ $rslt=mysql_to_mysqli($stmt, $link);
}
-
- $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysqli_real_escape_string($link, $webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db'$custom_reports_slave_SQL,webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting',queuemetrics_socket='$queuemetrics_socket',queuemetrics_socket_url='$queuemetrics_socket_url',enhanced_disconnect_logging='$enhanced_disconnect_logging',allow_emails='$allow_emails',level_8_disable_add='$level_8_disable_add',queuemetrics_record_hold='$queuemetrics_record_hold',country_code_list_stats='$country_code_list_stats',queuemetrics_pause_type='$queuemetrics_pause_type',frozen_server_call_clear='$frozen_server_call_clear',callback_time_24hour='$callback_time_24hour',enable_languages='$enable_languages',language_method='$language_method',meetme_enter_login_filename='$meetme_enter_login_filename',meetme_enter_leave3way_filename='$meetme_enter_leave3way_filename',enable_did_entry_list_id='$enable_did_entry_list_id',enable_third_webform='$enable_third_webform',allow_chats='$allow_chats',chat_url='$chat_url',chat_timeout='$chat_timeout',agent_debug_logging='$agent_debug_logging',default_language='$default_language',agent_whisper_enabled='$agent_whisper_enabled',user_hide_realtime_enabled='$user_hide_realtime_enabled',usacan_phone_dialcode_fix='$usacan_phone_dialcode_fix',cache_carrier_stats_realtime='$cache_carrier_stats_realtime',log_recording_access='$log_recording_access',report_default_format='$report_default_format',alt_ivr_logging='$alt_ivr_logging',default_phone_code='$default_phone_code',admin_row_click='$admin_row_click',admin_screen_colors='$admin_screen_colors',ofcom_uk_drop_calc='$ofcom_uk_drop_calc',agent_screen_colors='$agent_screen_colors',script_remove_js='$script_remove_js',manual_auto_next='$manual_auto_next',user_new_lead_limit='$user_new_lead_limit',agent_xfer_park_3way='$agent_xfer_park_3way',agent_soundboards='$agent_soundboards',web_loader_phone_length='$web_loader_phone_length',agent_script='$agent_script',agent_chat_screen_colors='$agent_chat_screen_colors',enable_auto_reports='$enable_auto_reports',enable_pause_code_limits='$enable_pause_code_limits',enable_drop_lists='$enable_drop_lists',allow_ip_lists='$allow_ip_lists',system_ip_blacklist='$system_ip_blacklist',agent_push_events='$agent_push_events',agent_push_url='$agent_push_url',hide_inactive_lists='$hide_inactive_lists',allow_manage_active_lists='$allow_manage_active_lists',expired_lists_inactive='$expired_lists_inactive',did_system_filter='$did_system_filter',anyone_callback_inactive_lists='$anyone_callback_inactive_lists',enable_gdpr_download_deletion='$enable_gdpr_download_deletion',source_id_display='$source_id_display',agent_logout_link='$agent_logout_link',manual_dial_validation='$manual_dial_validation',mute_recordings='$mute_recordings',user_admin_redirect='$user_admin_redirect',list_status_modification_confirmation='$list_status_modification_confirmation',sip_event_logging='$sip_event_logging',call_quota_lead_ranking='$call_quota_lead_ranking',enable_second_script='$enable_second_script',enable_first_webform='$enable_first_webform',recording_buttons='$recording_buttons',opensips_cid_name='$opensips_cid_name'$custom_dialplanSQL;";
- $rslt=mysql_to_mysqli($stmt, $link);
-
- if ( ($meetme_enter_login_filename != $SSmeetme_enter_login_filename) or ($meetme_enter_leave3way_filename != $SSmeetme_enter_leave3way_filename) )
- {$reload_dialplan_on_servers=1;}
-
- if ($reload_dialplan_on_servers > 0)
- {
- $stmtB="UPDATE system_settings set reload_timestamp=NOW();";
- $rslt=mysql_to_mysqli($stmtB, $link);
-
- $stmtC="UPDATE servers set rebuild_conf_files='Y' where active='Y' and active_asterisk_server='Y' and generate_vicidial_conf='Y';";
- $rslt=mysql_to_mysqli($stmtC, $link);
- }
-
- $update_gdpr_users_stmt="update vicidial_users set export_gdpr_leads='$enable_gdpr_download_deletion' where export_gdpr_leads>$enable_gdpr_download_deletion";
- $update_gdpr_users_rslt=mysql_to_mysqli($update_gdpr_users_stmt, $link);
- $update_gdpr_rows=mysqli_affected_rows($link);
- if ($update_gdpr_rows>0)
- {
- $event_notes="$update_gdpr_rows "._QXZ("GDPR-enabled users downgraded due to setting change");
- }
-
- ### LOG INSERTION Admin Log Table ###
- $SQL_log = "$stmt|$stmtB|$stmtC|";
- $SQL_log = preg_replace('/;/', '', $SQL_log);
- $SQL_log = addslashes($SQL_log);
- $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SYSTEMSETTINGS', event_type='MODIFY', record_id='system_settings', event_code='ADMIN MODIFY SYSTEM SETTINGS', event_sql=\"$SQL_log\", event_notes='$event_notes';";
- if ($DB) {echo "|$stmt|\n";}
- $rslt=mysql_to_mysqli($stmt, $link);
}
else
{
@@ -22081,7 +22143,7 @@ if ($ADD==3)
{
echo "
"._QXZ("PASSWORD IS ENCRYPTED, ONLY ENTER IN A PASSWORD BELOW IF YOU WANT TO CHANGE IT")."!
\n";
@@ -42954,8 +43019,14 @@ if ($ADD==999997)
$show_form=1;
if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) )
{
- if ( (strlen($pass) > 20) or (strlen($pass) < 2) or ($pass==$PHP_AUTH_PW) )
- {echo _QXZ("Password has not been changed, please try again")." |1|" . strlen($pass);}
+ if ( (strlen($pass) > 100) or (strlen($pass) < 2) or ($pass==$PHP_AUTH_PW) or ( ($SSrequire_password_length > 0) and ($SSrequire_password_length > strlen($pass)) ) )
+ {
+ echo _QXZ("Password has not been changed, please try again")." |1|" . strlen($pass);
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("Password must be at least $SSrequire_password_length characters long")."\n";
+ }
+ }
else
{
$pass_hash='';
@@ -43012,7 +43083,7 @@ if ($ADD==999997)
echo "\n";
echo "
\n";
- echo "
"._QXZ("New Password").":
"._QXZ("Strength").":
\n";
+ echo "
"._QXZ("New Password").":
"._QXZ("Strength").": "._QXZ("Length").": 0
\n";
echo "
"._QXZ("You are required to change your password before you can continue on to Administration. The longer the password is, the stronger it will be. Your password must be from 2 to 100 characters in length and cannot contain any characters that are not letters or numbers. Be sure that this password is something that you can remember, because as soon as you make this change you will be prompted to enter your new password to log back in to Administration")."
\n";
@@ -43033,8 +43104,14 @@ if ($ADD==999996)
$show_form=1;
if ( ($stage=='SUBMIT') or ($stage==_QXZ("SUBMIT")) )
{
- if ( (strlen($pass) > 20) or (strlen($pass) < 2) or ($pass==$PHP_AUTH_PW) )
- {echo _QXZ("Password has not been changed, please try again")." |1|" . strlen($pass);}
+ if ( (strlen($pass) > 100) or (strlen($pass) < 2) or ($pass==$PHP_AUTH_PW) or ( ($SSrequire_password_length > 0) and ( ($SSrequire_password_length > strlen($default_phone_registration_password)) or ( ($SSrequire_password_length > strlen($default_phone_login_password)) or ( ($SSrequire_password_length > strlen($default_server_password)) ) ) or ($SSrequire_password_length > strlen($pass)) ) ) )
+ {
+ echo _QXZ("Password has not been changed, please try again")." |1|" . strlen($pass);
+ if ($SSrequire_password_length > 0)
+ {
+ echo " "._QXZ("All passwords must be at least $SSrequire_password_length characters long")."\n";
+ }
+ }
else
{
$pass_hash='';
@@ -43107,17 +43184,17 @@ if ($ADD==999996)
echo "
"._QXZ("You are required to change your password before you can continue on to Administration. The longer the password is, the stronger it will be. Your password must be from 2 to 100 characters in length and cannot contain any characters that are not letters or numbers. Be sure that this password is something that you can remember, because as soon as you complete this initial setup screen you will be prompted to enter your new password in again to log back in to Administration")."
\n";
- echo "
"._QXZ("New Password").":
"._QXZ("Strength").":
\n";
+ echo "
"._QXZ("New Password").":
"._QXZ("Strength").": "._QXZ("Length").": 0
\n";
echo "
\n";
echo "
"._QXZ("The next three default passwords are defined in the System Settings section, and you can change them after you define them here. It is a good idea to make these passwords strong so that no one can hack into your phone accounts and place phone calls without you knowing. The default registration password used when new phones are added to the system as the SIP or IAX VOIP phone password. The default phone web login password used when new phones are added to the system, as the phone password that an agent would use in the ViciDial Agent Interface. The default server password used when new servers are added to the system for servers to communicate with each other.")."
\n";
- echo "
"._QXZ("Default Phone Registration Password").":
"._QXZ("Strength").":
\n";
+ echo "
"._QXZ("Default Phone Registration Password").":
"._QXZ("Strength").": "._QXZ("Length").": 0
\n";
- echo "
"._QXZ("Default Phone Login Password").":
"._QXZ("Strength").":
\n";
+ echo "
"._QXZ("Default Phone Login Password").":
"._QXZ("Strength").": "._QXZ("Length").": 0
\n";
- echo "
"._QXZ("Default Server Password").":
"._QXZ("Strength").":
\n";
+ echo "
"._QXZ("Default Server Password").":
"._QXZ("Strength").": "._QXZ("Length").": 0
\n";
echo "
\n";
diff --git a/agc_2-X/trunk/www/vicidial/admin_header.php b/agc_2-X/trunk/www/vicidial/admin_header.php
index 45b7b73c..45d60013 100644
--- a/agc_2-X/trunk/www/vicidial/admin_header.php
+++ b/agc_2-X/trunk/www/vicidial/admin_header.php
@@ -1,7 +1,7 @@
LICENSE: AGPLv2
+# Copyright (C) 2020 Matt Florell LICENSE: AGPLv2
#
# CHANGES
@@ -80,6 +80,7 @@
# 190121-1803 - Added special streamlined header option for mobile devices
# 190530-1013 - Added javascript for active list change feature
# 191028-1739 - Added VM Message Groups
+# 200206-2314 - Added password length indicator
#
$stmt="SELECT admin_home_url,enable_tts_integration,callcard_enabled,custom_fields_enabled,allow_emails,level_8_disable_add,allow_chats,enable_languages,admin_row_click,admin_screen_colors,user_new_lead_limit,user_territories_active,qc_features_active,agent_soundboards,enable_drop_lists,allow_ip_lists from system_settings;";
@@ -652,10 +653,12 @@ if ( ( ($ADD==34) or ($ADD==31) or ($ADD==49) ) and ($SUB==29) and ($LOGmodify_c
var strong = new Image();
strong.src = "images/strong.png";
- function pwdChanged(pwd_field_str, pwd_img_str)
+ function pwdChanged(pwd_field_str, pwd_img_str, pwd_len_field, pwd_len_min)
{
var pwd_field = document.getElementById(pwd_field_str);
+ var pwd_field_value = pwd_field.value;
var pwd_img = document.getElementById(pwd_img_str);
+ var pwd_len = pwd_field_value.length
// var strong_regex = new RegExp( "^(?=.{8,})(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])", "g" );
// var medium_regex = new RegExp( "^(?=.{6,})(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9]))).*$", "g" );
@@ -677,6 +680,10 @@ if ( ( ($ADD==34) or ($ADD==31) or ($ADD==49) ) and ($SUB==29) and ($LOGmodify_c
if (pwd_img.src != weak.src)
{pwd_img.src = weak.src;}
}
+ if ( (pwd_len_min > 0) && (pwd_len_min > pwd_len) )
+ {document.getElementById(pwd_len_field).innerHTML = "" + pwd_len + "";}
+ else
+ {document.getElementById(pwd_len_field).innerHTML = "" + pwd_len + "";}
}
function openNewWindow(url)
diff --git a/agc_2-X/trunk/www/vicidial/help_documentation.txt b/agc_2-X/trunk/www/vicidial/help_documentation.txt
index d3885414..0d5aa3d3 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: 20200204234401
+# version: 20200206220601
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. Default is N.
@@ -1078,6 +1078,7 @@ settings-recording_buttons Recording Buttons Type This option allows you to
settings-mute_recordings Allow Mute Recordings This option if enabled allows you to enable the MUTE RECORDING button on the agent screen by campaign and-or user. This feature is only tested with systems running Asterisk 13. You should not mute recordings for more than 15 minutes at a time. Default is 0 for disabled.
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-default_phone_registration_password Default Phone Registration Password This is the default registration password used when new phones are added to the system. Default is test.
settings-default_phone_login_password Default Phone Login Password This is the default phone web login password used when new phones are added to the system. Default is test.
settings-default_server_password Default Server Password This is the default server password used when new servers are added to the system. Default is test.