From 37cb565f15deff2abef92c00e5b9898b76de1236 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 18 Apr 2023 14:13:01 +0000 Subject: [PATCH] Added astguiclient_disabled agc/options.php setting, disabled by default git-svn-id: svn://192.168.202.10@3708 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/agc/astguiclient.php | 14 +++++++++++--- agc_2-X/trunk/www/agc/options-example.php | 4 +++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/agc_2-X/trunk/www/agc/astguiclient.php b/agc_2-X/trunk/www/agc/astguiclient.php index c3e82ade..92961399 100644 --- a/agc_2-X/trunk/www/agc/astguiclient.php +++ b/agc_2-X/trunk/www/agc/astguiclient.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # make sure you have added a user to the vicidial_users MySQL table with at least # user_level 1 or greater to access this page. Also you need to have the login @@ -73,11 +73,13 @@ # 210615-1037 - Default security fixes, CVE-2021-28854 # 210616-2053 - Added optional CORS support, see options.php for details # 220220-0938 - Added allow_web_debug system setting +# 230418-1009 - Added astguiclient_disabled options.php setting, disabled by default # -$version = '2.2.6-6'; -$build = '220220-0938'; +$version = '2.2.6-7'; +$build = '230418-1009'; $php_script = 'astguiclient.php'; +$astguiclient_disabled = '1'; require_once("dbconnect_mysqli.php"); require_once("functions.php"); @@ -124,6 +126,12 @@ if (file_exists('options.php')) require_once('options.php'); } +if ($astguiclient_disabled > 0) + { + echo "astguiclient is disabled on this system\n"; + exit; + } + ############################################# ##### START SYSTEM_SETTINGS AND USER LANGUAGE LOOKUP ##### $stmt = "SELECT use_non_latin,enable_languages,language_method,default_language,allow_web_debug FROM system_settings;"; diff --git a/agc_2-X/trunk/www/agc/options-example.php b/agc_2-X/trunk/www/agc/options-example.php index 23ff2c34..b3099ca1 100644 --- a/agc_2-X/trunk/www/agc/options-example.php +++ b/agc_2-X/trunk/www/agc/options-example.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2023 Matt Florell LICENSE: AGPLv2 # # rename this file to options.php for the settings here to go into effect # @@ -25,6 +25,7 @@ # 220127-0931 - Added email_header_attach and allow_sendmail_bypass options # 220916-0901 - Added INSERT_before_body_close option, Issue #1375 # 221206-1458 - Added login_submit_once option +# 230418-1008 - Added astguiclient_disabled option # $conf_silent_prefix = '5'; # vicidial_conferences prefix to enter silently and muted for recording @@ -72,6 +73,7 @@ $email_attachment_path = './attachments'; # set to the absolute path from where $email_header_attach = '0'; # set to 1 to force blank line after attachments in header. WARNING: Will break on newer versions of PHP $allow_sendmail_bypass = ''; # some setups require bypassing PHP's mail() function to send properly, set this to 'sendmail' path: '/usr/sbin/sendmail' $login_submit_once = '1'; # set to 0 to remove the "disable the login submit button after submitting" feature +$astguiclient_disabled = '1'; # set to 0 to allow use of the astguiclient.php script $TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen