From 7baba29d9d9a34dcc2ac050963cbf0d50f0f4567 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 25 Nov 2024 12:39:53 +0700 Subject: [PATCH 1/9] [ticket/17443] Increase Guzzle client request timeout for version checks PHPBB-17443 --- phpBB/phpbb/version_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/version_helper.php b/phpBB/phpbb/version_helper.php index 3e11c3419e..4844c6e62e 100644 --- a/phpBB/phpbb/version_helper.php +++ b/phpBB/phpbb/version_helper.php @@ -381,7 +381,7 @@ class version_helper } else if ($info === false || $force_update) { - $info = $this->file_downloader->get($this->host, $this->path, $this->file, $this->use_ssl ? 443 : 80); + $info = $this->file_downloader->get($this->host, $this->path, $this->file, $this->use_ssl ? 443 : 80, 30); $error_string = $this->file_downloader->get_error_string(); if (!empty($error_string)) From 253579761d95be031f4265a004873c13e36d7019 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 25 Nov 2024 13:30:33 +0700 Subject: [PATCH 2/9] [ticket/17443] Fix HTTP 403 response to Guzzle client requests for some hosts PHPBB-17443 --- phpBB/phpbb/file_downloader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpBB/phpbb/file_downloader.php b/phpBB/phpbb/file_downloader.php index 14607ece0c..c73983f464 100644 --- a/phpBB/phpbb/file_downloader.php +++ b/phpBB/phpbb/file_downloader.php @@ -51,6 +51,10 @@ class file_downloader return new Client([ 'base_uri' => $host, 'timeout' => $timeout, + 'headers' => [ + 'user-agent' => 'phpBB/' . PHPBB_VERSION, + 'accept' => 'text/html,application/xhtml+xml,application/xml' + ], ]); } From 13945f56a9daf89e5e87b87257c62d89da142aa9 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 25 Nov 2024 16:06:44 +0700 Subject: [PATCH 3/9] [ticket/17443] Use default */* accept header (like curl etc) PHPBB-17443 --- phpBB/phpbb/file_downloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/file_downloader.php b/phpBB/phpbb/file_downloader.php index c73983f464..0dcb3e5854 100644 --- a/phpBB/phpbb/file_downloader.php +++ b/phpBB/phpbb/file_downloader.php @@ -53,7 +53,7 @@ class file_downloader 'timeout' => $timeout, 'headers' => [ 'user-agent' => 'phpBB/' . PHPBB_VERSION, - 'accept' => 'text/html,application/xhtml+xml,application/xml' + 'accept' => '*/*', ], ]); } From 8978594d6d9c92be3a35f2adec138516df3670f0 Mon Sep 17 00:00:00 2001 From: Kailey M Snay Date: Fri, 29 Nov 2024 15:45:42 -0500 Subject: [PATCH 4/9] [ticket/17446] Add acp_account_activation_edit_add event Event added for additional account activation methods. PHPBB-17446 --- phpBB/includes/acp/acp_board.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index bfc2c0b97f..336c22d354 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -931,6 +931,18 @@ class acp_board ); $act_options = ''; + + /** + * Event to add and/or modify account activation configurations + * + * @event core.acp_account_activation_edit_add + * @var array act_ary Array of account activation methods + * @var string act_options Options avialbe in the activation method + * @since 3.3.15-RC1 + */ + $vars = array('act_ary', 'act_options'); + extract($phpbb_dispatcher->trigger_event('core.acp_account_activation_edit_add', compact($vars))); + foreach ($act_ary as $key => $data) { list($available, $value) = $data; From 332ecb3d9c350dcf2941dd43b92d6cea458dd111 Mon Sep 17 00:00:00 2001 From: Kailey M Snay Date: Fri, 29 Nov 2024 15:56:30 -0500 Subject: [PATCH 5/9] [ticket/17446] Use array shorthand PHPBB-17446 --- phpBB/includes/acp/acp_board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 336c22d354..9d8a1f3bcd 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -940,7 +940,7 @@ class acp_board * @var string act_options Options avialbe in the activation method * @since 3.3.15-RC1 */ - $vars = array('act_ary', 'act_options'); + $vars = ['act_ary', 'act_options']; extract($phpbb_dispatcher->trigger_event('core.acp_account_activation_edit_add', compact($vars))); foreach ($act_ary as $key => $data) From 922fde6d53f8d6eec47b263cbe47a01c2be5b225 Mon Sep 17 00:00:00 2001 From: Kailey M Snay Date: Fri, 29 Nov 2024 23:02:40 -0500 Subject: [PATCH 6/9] [ticket/17446] Add $phpbb_dispatcher and docblock updates PHPBB-17446 --- phpBB/includes/acp/acp_board.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 9d8a1f3bcd..bb18336160 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -921,7 +921,7 @@ class acp_board */ function select_acc_activation($selected_value, $value) { - global $user, $config; + global $user, $config, $phpbb_dispatcher; $act_ary = array( 'ACC_DISABLE' => array(true, USER_ACTIVATION_DISABLE), @@ -933,13 +933,13 @@ class acp_board $act_options = ''; /** - * Event to add and/or modify account activation configurations - * - * @event core.acp_account_activation_edit_add - * @var array act_ary Array of account activation methods - * @var string act_options Options avialbe in the activation method - * @since 3.3.15-RC1 - */ + * Event to add and/or modify account activation configurations + * + * @event core.acp_account_activation_edit_add + * @var array act_ary Array of account activation methods + * @var string act_options Options avialbe in the activation method + * @since 3.3.15-RC1 + */ $vars = ['act_ary', 'act_options']; extract($phpbb_dispatcher->trigger_event('core.acp_account_activation_edit_add', compact($vars))); From a4879e924954ef69f8007ac1dd4aa9a99c4277f6 Mon Sep 17 00:00:00 2001 From: Kailey M Snay Date: Fri, 29 Nov 2024 23:57:35 -0500 Subject: [PATCH 7/9] [ticket/17446] Fix typo PHPBB-17446 --- phpBB/includes/acp/acp_board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index bb18336160..acd2a72cf7 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -937,7 +937,7 @@ class acp_board * * @event core.acp_account_activation_edit_add * @var array act_ary Array of account activation methods - * @var string act_options Options avialbe in the activation method + * @var string act_options Options available in the activation method * @since 3.3.15-RC1 */ $vars = ['act_ary', 'act_options']; From 65283a9ab86bc43e919b8f6c76546562b78aa0fc Mon Sep 17 00:00:00 2001 From: Kailey M Snay Date: Fri, 29 Nov 2024 23:31:34 -0500 Subject: [PATCH 8/9] [ticket/17446] Master: Add acp_account_activation_edit_add event PHPBB-17446 --- phpBB/includes/acp/acp_board.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 959388e075..4ab5e739bd 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -938,7 +938,7 @@ class acp_board */ function select_acc_activation($selected_value, $value) { - global $user, $config; + global $user, $config, $phpbb_dispatcher; $act_ary = [ 'ACC_DISABLE' => [true, USER_ACTIVATION_DISABLE], @@ -948,6 +948,18 @@ class acp_board ]; $act_options = []; + + /** + * Event to add and/or modify account activation configurations + * + * @event core.acp_account_activation_edit_add + * @var array act_ary Array of account activation methods + * @var array act_options Options avialbe in the activation method + * @since 3.3.15-RC1 + */ + $vars = ['act_ary', 'act_options']; + extract($phpbb_dispatcher->trigger_event('core.acp_account_activation_edit_add', compact($vars))); + foreach ($act_ary as $key => $data) { list($available, $value) = $data; From 8b274d4006ee77e812b17d18024b7cbd3a9520ab Mon Sep 17 00:00:00 2001 From: Kailey M Snay Date: Fri, 29 Nov 2024 23:55:34 -0500 Subject: [PATCH 9/9] [ticket/17446] Master: Fix typo PHPBB-17446 --- phpBB/includes/acp/acp_board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 4ab5e739bd..9359a57a1c 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -954,7 +954,7 @@ class acp_board * * @event core.acp_account_activation_edit_add * @var array act_ary Array of account activation methods - * @var array act_options Options avialbe in the activation method + * @var array act_options Options available in the activation method * @since 3.3.15-RC1 */ $vars = ['act_ary', 'act_options'];