From 0ccce7c4f8b2b645fd41eb4ebfc26a1ed4301939 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 26 Apr 2021 20:38:03 +0200 Subject: [PATCH] [ticket/16764] Remove remote upload certificate validation PHPBB3-16764 --- phpBB/includes/acp/acp_board.php | 1 - phpBB/install/schemas/schema_data.sql | 1 - phpBB/language/en/acp/board.php | 2 -- .../data/v400/remove_remote_upload.php | 33 +++++++++++++++++++ 4 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 phpBB/phpbb/db/migration/data/v400/remove_remote_upload.php diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index ddf99a57b5..f03a3e1ee4 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -419,7 +419,6 @@ class acp_board 'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'referer_validation' => array('lang' => 'REFERRER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true), - 'remote_upload_verify' => array('lang' => 'UPLOAD_CERT_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true), diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index aee9644c2a..3a98eab482 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -265,7 +265,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('recaptcha_v3_thres INSERT INTO phpbb_config (config_name, config_value) VALUES ('recaptcha_v3_threshold_register', '0.5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('recaptcha_v3_threshold_report', '0.5'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('remote_upload_verify', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('search_anonymous_interval', '0'); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 3f1a1b52f1..d02c8b0141 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -544,8 +544,6 @@ $lang = array_merge($lang, array( 'REFERRER_VALID_EXPLAIN' => 'If enabled, the referrer of POST requests will be checked against the host/script path settings. This may cause issues with boards using several domains and or external logins.', 'TPL_ALLOW_PHP' => 'Allow php in templates', 'TPL_ALLOW_PHP_EXPLAIN' => 'If this option is enabled, PHP and INCLUDEPHP statements will be recognised and parsed in templates.', - 'UPLOAD_CERT_VALID' => 'Validate upload certificate', - 'UPLOAD_CERT_VALID_EXPLAIN' => 'If enabled, certificates of remote uploads will be validated. This requires the CA bundle to be defined by the openssl.cafile or curl.cainfo setting in your php.ini.', )); // Email Settings diff --git a/phpBB/phpbb/db/migration/data/v400/remove_remote_upload.php b/phpBB/phpbb/db/migration/data/v400/remove_remote_upload.php new file mode 100644 index 0000000000..234d5353b1 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v400/remove_remote_upload.php @@ -0,0 +1,33 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\db\migration\data\v400; + +use phpbb\db\migration\container_aware_migration; + +class remove_remote_upload extends container_aware_migration +{ + public static function depends_on() + { + return [ + '\phpbb\db\migration\data\v320\remote_upload_validation' + ]; + } + + public function update_data() + { + return [ + ['config.remove', ['remote_upload_verify']], + ]; + } +}