diff --git a/LANG_admin.zip b/LANG_admin.zip index edf0eec..e9bace2 100644 Binary files a/LANG_admin.zip and b/LANG_admin.zip differ diff --git a/LANG_agc.zip b/LANG_agc.zip index 71df186..1dd1958 100644 Binary files a/LANG_agc.zip and b/LANG_agc.zip differ diff --git a/VICIDIAL_web/admin.php b/VICIDIAL_web/admin.php index 43adf28..816dd7d 100644 --- a/VICIDIAL_web/admin.php +++ b/VICIDIAL_web/admin.php @@ -351,7 +351,6 @@ $allow_closers = ereg_replace("[^NY]","",$allow_closers); $reset_hopper = ereg_replace("[^NY]","",$reset_hopper); $amd_send_to_vmx = ereg_replace("[^NY]","",$amd_send_to_vmx); $alt_number_dialing = ereg_replace("[^NY]","",$alt_number_dialing); -$scheduled_callbacks = ereg_replace("[^NY]","",$scheduled_callbacks); $safe_harbor_message = ereg_replace("[^NY]","",$safe_harbor_message); $selectable = ereg_replace("[^NY]","",$selectable); $reset_list = ereg_replace("[^NY]","",$reset_list); @@ -373,6 +372,7 @@ $campaign_recording = ereg_replace("[^0-9a-zA-Z]","",$campaign_recording); $ADD = ereg_replace("[^0-9a-zA-Z]","",$ADD); $dial_prefix = ereg_replace("[^0-9a-zA-Z]","",$dial_prefix); $state_call_time_state = ereg_replace("[^0-9a-zA-Z]","",$state_call_time_state); +$scheduled_callbacks = ereg_replace("[^0-9a-zA-Z]","",$scheduled_callbacks); ### DIGITS and Dots $server_ip = ereg_replace("[^\.0-9]","",$server_ip); @@ -425,10 +425,12 @@ $campaign_rec_filename = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$campaign_rec_fi $call_time_name = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_name); $call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments); +### remove semi-colons ### +$lead_filter_sql = ereg_replace(";","",$lead_filter_sql); + ### VARIABLES TO BE mysql_real_escape_string ### # $web_form_address # $script_text -# $lead_filter_sql ##### END VARIABLE FILTERING FOR SECURITY ##### @@ -491,12 +493,13 @@ $call_time_comments = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$call_time_comments # 60613-1415 - Added lead recycling options to campaign detail screen # 60619-1523 - Added variable filtering to eliminate SQL injection attack threat # 60622-1216 - Fixed HotKey addition form issues and variable filtering +# 60623-1159 - Fixed Scheduled Callbacks over-filtering bug and filter_sql bug # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$version = '1.1.12'; -$build = '60622-1216'; +$version = '1.1.12-3'; +$build = '60623-1159'; $STARTtime = date("U"); @@ -2584,7 +2587,7 @@ if ($ADD==21111111) } else { - $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "';"; + $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='$lead_filter_sql';"; $rslt=mysql_query($stmt, $link); echo "
FILTER ADDED: $lead_filter_id\n"; @@ -3191,7 +3194,7 @@ if ($ADD==41111111) } else { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "' where lead_filter_id='$lead_filter_id';"; + $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='$lead_filter_sql' where lead_filter_id='$lead_filter_id';"; $rslt=mysql_query($stmt, $link); echo "
FILTER MODIFIED\n"; diff --git a/agc/vdc_db_query.php b/agc/vdc_db_query.php index acde2df..ef28798 100644 --- a/agc/vdc_db_query.php +++ b/agc/vdc_db_query.php @@ -103,10 +103,11 @@ # 60427-1236 - Fixed closer_choice error for CLOSER campaigns # 60609-1148 - Added ability to check for manual dial numbers in DNC # 60619-1117 - Added variable filters to close security holes for login form +# 60623-1414 - Fixed variable filter for phone_code and fixed manual dial logic # -$version = '0.0.33'; -$build = '60619-1117'; +$version = '0.0.34'; +$build = '60623-1414'; require("dbconnect.php"); @@ -236,7 +237,7 @@ if (isset($_GET["use_internal_dnc"])) {$use_internal_dnc=$_GET["use_internal_d $user=ereg_replace("[^0-9a-zA-Z]","",$user); $pass=ereg_replace("[^0-9a-zA-Z]","",$pass); $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); -$phone_code = ereg_replace("[^0-9]","",$length_in_sec); +$phone_code = ereg_replace("[^0-9]","",$phone_code); $phone_number = ereg_replace("[^0-9]","",$phone_number); @@ -391,44 +392,41 @@ if ($ACTION == 'manDiaLnextCaLL') echo "DNC NUMBER\n"; exit; } + } + if ($stage=='lookup') + { + $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $man_leadID_ct = mysql_num_rows($rslt); + if ($man_leadID_ct > 0) + { + $row=mysql_fetch_row($rslt); + $affected_rows=1; + $lead_id =$row[0]; + $CBleadIDset=1; + } else { - if ($stage=='lookup') - { - $stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $man_leadID_ct = mysql_num_rows($rslt); - if ($man_leadID_ct > 0) - { - $row=mysql_fetch_row($rslt); - $affected_rows=1; - $lead_id =$row[0]; - $CBleadIDset=1; - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } - } - else - { - ### insert a new lead in the system with this phone number - $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - $affected_rows = mysql_affected_rows($link); - $lead_id = mysql_insert_id(); - $CBleadIDset=1; - } + ### insert a new lead in the system with this phone number + $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + $lead_id = mysql_insert_id(); + $CBleadIDset=1; } } + else + { + ### insert a new lead in the system with this phone number + $stmt = "INSERT INTO vicidial_list SET phone_code='$phone_code',phone_number='$phone_number',list_id='$list_id',status='QUEUE',user='$user',called_since_last_reset='Y',entry_date='$ENTRYdate';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + $affected_rows = mysql_affected_rows($link); + $lead_id = mysql_insert_id(); + $CBleadIDset=1; + } } else { diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index 34aeeee..fc1d5f7 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -514,7 +514,7 @@ NOTE: a minimum of MySQL 4.0.X is required - you are done ***** NOTE: if you use MySQL version 4.0.X: ***** - (http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-4.0/mysql-4.0.26.tar.gz) + (http://mirror.trouble-free.net/mysql_mirror/Downloads/MySQL-4.0/mysql-4.0.27.tar.gz) Then you need to make sure that you use the 0.08 version of the Net::MySQL perl module. This can be found in the astguiclient release zip file in the libs/Net folder(MySQL.pm). Here are instructions on how to replace the @@ -525,7 +525,7 @@ NOTE: a minimum of MySQL 4.0.X is required - locate -u - locate MySQL.pm (replace the path below with the path you find) - mv /usr/lib/perl5/site_perl/5.8.6/Net/MySQL.pm MySQL.pm-old - - cp /home/cron/astguiclient_1.1.12/libs/Net/MySQL.pm /usr/lib/perl5/site_perl/5.8.6/Net/MySQL.pm + - cp /home/cron/astguiclient_1.1.12-3/libs/Net/MySQL.pm /usr/lib/perl5/site_perl/5.8.6/Net/MySQL.pm If you do not do this, then you will see MySQL authentication errors on your Asterisk server. @@ -1422,8 +1422,8 @@ package(as of this writing it is 1.1.12) - cd /home/cron - mkdir astguiclient - cd astguiclient - - wget http://internap.dl.sourceforge.net/sourceforge/astguiclient/astguiclient_1.1.12-2.zip - - unzip astguiclient_1.1.12-2.zip + - wget http://internap.dl.sourceforge.net/sourceforge/astguiclient/astguiclient_1.1.12-3.zip + - unzip astguiclient_1.1.12-3.zip - chmod 0755 install_server_files.pl - perl install_server_files.pl - cd ../ diff --git a/docs/TODO.txt b/docs/TODO.txt index 12f9af4..5a5a477 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -27,6 +27,7 @@ +- MEDIUM Add buttons and selector box to script modification page to allow for insertion of field codes without having to manually type them. - MEDIUM Rewrite the inbound and closer call handling to allow for music on hold per in-group and a single queue app instead of multiple AGIs each running their own queries. Currently with large queues and long wait times a lot of load is generated with calls on hold in the queue. Switching to a central queue application would reduce the load and speed things up.