Added allow_web_debug system setting and more variable filtering
git-svn-id: svn://192.168.202.10@3574 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
+16
-14
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# list_split.php - split one big list into smaller lists. Part of Admin Utilities.
|
||||
#
|
||||
# Copyright (C) 2021 Matt Florell,Michael Cargile <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2022 Matt Florell,Michael Cargile <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 140916-1215 - Initial Build
|
||||
@@ -13,10 +13,11 @@
|
||||
# 170819-1001 - Added allow_manage_active_lists option
|
||||
# 190703-0925 - Added use of admin_web_directory system setting
|
||||
# 210427-1741 - Added more list count options
|
||||
# 220227-2204 - Added allow_web_debug system setting
|
||||
#
|
||||
|
||||
$version = '2.14-9';
|
||||
$build = '210427-1741';
|
||||
$version = '2.14-10';
|
||||
$build = '220227-2204';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -49,18 +50,12 @@ if (isset($_GET["num_leads"])) {$num_leads=$_GET["num_leads"];}
|
||||
elseif (isset($_POST["num_leads"])) {$num_leads=$_POST["num_leads"];}
|
||||
|
||||
$DB = preg_replace('/[^0-9]/','',$DB);
|
||||
$submit = preg_replace('/[^-_0-9a-zA-Z]/','',$submit);
|
||||
$confirm = preg_replace('/[^-_0-9a-zA-Z]/','',$confirm);
|
||||
$orig_list = preg_replace('/[^0-9]/','',$orig_list);
|
||||
$start_dest_list_id = preg_replace('/[^0-9]/','',$start_dest_list_id);
|
||||
$num_leads = preg_replace('/[^0-9]/','',$num_leads);
|
||||
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$sys_settings_stmt = "SELECT use_non_latin,outbound_autodial_active,sounds_central_control_active,enable_languages,language_method,active_modules,admin_screen_colors,allow_manage_active_lists,admin_web_directory FROM system_settings;";
|
||||
$sys_settings_stmt = "SELECT use_non_latin,outbound_autodial_active,sounds_central_control_active,enable_languages,language_method,active_modules,admin_screen_colors,allow_manage_active_lists,admin_web_directory,allow_web_debug FROM system_settings;";
|
||||
$sys_settings_rslt=mysql_to_mysqli($sys_settings_stmt, $link);
|
||||
if ($DB) {echo "$sys_settings_stmt\n";}
|
||||
#if ($DB) {echo "$sys_settings_stmt\n";}
|
||||
$num_rows = mysqli_num_rows($sys_settings_rslt);
|
||||
if ($num_rows > 0)
|
||||
{
|
||||
@@ -74,15 +69,23 @@ if ($num_rows > 0)
|
||||
$SSadmin_screen_colors = $sys_settings_row[6];
|
||||
$SSallow_manage_active_lists = $sys_settings_row[7];
|
||||
$SSadmin_web_directory = $sys_settings_row[8];
|
||||
$SSallow_web_debug = $sys_settings_row[9];
|
||||
}
|
||||
else
|
||||
{
|
||||
# there is something really weird if there are no system settings
|
||||
exit;
|
||||
}
|
||||
if ($SSallow_web_debug < 1) {$DB=0;}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
$submit = preg_replace('/[^-_0-9a-zA-Z]/','',$submit);
|
||||
$confirm = preg_replace('/[^-_0-9a-zA-Z]/','',$confirm);
|
||||
$orig_list = preg_replace('/[^0-9]/','',$orig_list);
|
||||
$start_dest_list_id = preg_replace('/[^0-9]/','',$start_dest_list_id);
|
||||
$num_leads = preg_replace('/[^0-9]/','',$num_leads);
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
|
||||
@@ -90,10 +93,9 @@ if ($non_latin < 1)
|
||||
}
|
||||
else
|
||||
{
|
||||
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
|
||||
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||
$PHP_AUTH_USER = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_USER);
|
||||
$PHP_AUTH_PW = preg_replace('/[^-_0-9\p{L}]/u', '', $PHP_AUTH_PW);
|
||||
}
|
||||
$list_id_override = preg_replace('/[^0-9]/','',$list_id_override);
|
||||
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
|
||||
Reference in New Issue
Block a user