From 73c133c91dbd4ed8dba4496ce764fee90906fa62 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 12:14:16 +0200 Subject: [PATCH 01/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- phpBB/includes/functions_user.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index d39dbed5ff..a44b92dd8d 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1470,8 +1470,11 @@ function user_ipwhois($ip) $ipwhois = ''; - // Limit the query to all possible flags (whois.arin.net) - $ip = 'z ' . $ip; + if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + // Limit the query to all possible flags (whois.arin.net) + $ip = 'z ' . $ip; + } if (($fsk = @fsockopen($whois_host, 43))) { From f8acf53f720742cde41c60ace20bcace649c9f84 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 13:28:23 +0200 Subject: [PATCH 02/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- phpBB/includes/functions_user.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index a44b92dd8d..9e136cc1ff 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1470,16 +1470,10 @@ function user_ipwhois($ip) $ipwhois = ''; - if (!filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - // Limit the query to all possible flags (whois.arin.net) - $ip = 'z ' . $ip; - } - if (($fsk = @fsockopen($whois_host, 43))) { // CRLF as per RFC3912 - fputs($fsk, "$ip\r\n"); + fputs($fsk, "z $ip\r\n"); while (!feof($fsk)) { $ipwhois .= fgets($fsk, 1024); From af6eebaa1a49a7365a3a56322d05854db3ddcb23 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 13:33:46 +0200 Subject: [PATCH 03/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- phpBB/includes/functions_user.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 9e136cc1ff..495f0dcacb 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1473,6 +1473,7 @@ function user_ipwhois($ip) if (($fsk = @fsockopen($whois_host, 43))) { // CRLF as per RFC3912 + // Z to limit the query to all possible flags (whois.arin.net) fputs($fsk, "z $ip\r\n"); while (!feof($fsk)) { From 3392f3aa091e21dca193c8b9c601a4d8c768b154 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 14:04:02 +0200 Subject: [PATCH 04/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- tests/functions_user/whois_test.php | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tests/functions_user/whois_test.php diff --git a/tests/functions_user/whois_test.php b/tests/functions_user/whois_test.php new file mode 100644 index 0000000000..a9ff387728 --- /dev/null +++ b/tests/functions_user/whois_test.php @@ -0,0 +1,32 @@ +assertNotContains('Query terms are ambiguous', $ip_whois); + $this->assertNotContains('no entries found', $ip_whois); + $this->assertNotContains('ERROR', $ip_whois); + } +} From 7b062b76c7a2c8f2e090eafbddf831c53d77a63e Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 14:28:10 +0200 Subject: [PATCH 05/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- tests/functions_user/whois_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functions_user/whois_test.php b/tests/functions_user/whois_test.php index a9ff387728..eb20722926 100644 --- a/tests/functions_user/whois_test.php +++ b/tests/functions_user/whois_test.php @@ -9,7 +9,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php'; -class phpbb_functions_user_whois_test extends phpbb_functional_test_case +class phpbb_functions_user_whois_test extends phpbb_test_case { public function ips_data() { From 568a74e22c5d682c247d7e519e49cc141885c7d6 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 14:38:16 +0200 Subject: [PATCH 06/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- tests/functions_user/whois_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functions_user/whois_test.php b/tests/functions_user/whois_test.php index eb20722926..964594a57e 100644 --- a/tests/functions_user/whois_test.php +++ b/tests/functions_user/whois_test.php @@ -14,7 +14,7 @@ class phpbb_functions_user_whois_test extends phpbb_test_case public function ips_data() { return [ - ['2001:4860:4860::8888'], // Google public DNS + ['2001:4860:4860:0000:0000:0000:0000:8888'], // Google public DNS ['64.233.161.139'], // google.com ]; } From 4d5e8df8e69b17f17eb731b46edd57281248c0be Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 14:50:38 +0200 Subject: [PATCH 07/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- tests/functions_user/whois_test.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/functions_user/whois_test.php b/tests/functions_user/whois_test.php index 964594a57e..1b964d7377 100644 --- a/tests/functions_user/whois_test.php +++ b/tests/functions_user/whois_test.php @@ -11,10 +11,23 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions_user.php'; class phpbb_functions_user_whois_test extends phpbb_test_case { - public function ips_data() + protected function setUp() + { + global $config, $phpbb_dispatcher, $user, $request, $symfony_request; + + $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx); + $lang = new \phpbb\language\language($lang_loader); + $user = new \phpbb\user($lang, '\phpbb\datetime'); + $phpbb_dispatcher = new phpbb_mock_event_dispatcher(); + $config = new \phpbb\config\config([]); + $request = new phpbb_mock_request(); + $symfony_request = new \phpbb\symfony_request($request); + } + + public function ips_data() { return [ - ['2001:4860:4860:0000:0000:0000:0000:8888'], // Google public DNS + ['2001:4860:4860::8888'], // Google public DNS ['64.233.161.139'], // google.com ]; } From 642b77453071ab2707e4d714a842f83768eaf24a Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 15:10:00 +0200 Subject: [PATCH 08/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- tests/functions_user/whois_test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functions_user/whois_test.php b/tests/functions_user/whois_test.php index 1b964d7377..ba8f54b7b1 100644 --- a/tests/functions_user/whois_test.php +++ b/tests/functions_user/whois_test.php @@ -13,7 +13,7 @@ class phpbb_functions_user_whois_test extends phpbb_test_case { protected function setUp() { - global $config, $phpbb_dispatcher, $user, $request, $symfony_request; + global $config, $phpbb_dispatcher, $user, $request, $symfony_request, $phpbb_root_path, $phpEx; $lang_loader = new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx); $lang = new \phpbb\language\language($lang_loader); From 481ca6190e84651acaf9e8e83f69cf5aba905116 Mon Sep 17 00:00:00 2001 From: 3D-I <480857+3D-I@users.noreply.github.com> Date: Tue, 2 Jun 2020 15:19:38 +0200 Subject: [PATCH 09/12] [ticket/16508] Fix WhoIs lookup PHPBB3-16508 --- tests/functions_user/whois_test.php | 45 ----------------------------- 1 file changed, 45 deletions(-) delete mode 100644 tests/functions_user/whois_test.php diff --git a/tests/functions_user/whois_test.php b/tests/functions_user/whois_test.php deleted file mode 100644 index ba8f54b7b1..0000000000 --- a/tests/functions_user/whois_test.php +++ /dev/null @@ -1,45 +0,0 @@ -assertNotContains('Query terms are ambiguous', $ip_whois); - $this->assertNotContains('no entries found', $ip_whois); - $this->assertNotContains('ERROR', $ip_whois); - } -} From 6ab2821c34b0374081636274561aad0072d6ceaf Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 7 Jun 2020 12:03:05 +0200 Subject: [PATCH 10/12] [prep-release-3.2.10] Update version numbers for 3.2.10-RC2 --- build/build.xml | 6 +++--- phpBB/includes/constants.php | 2 +- phpBB/install/phpbbcli.php | 2 +- phpBB/install/schemas/schema_data.sql | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/build.xml b/build/build.xml index ffa4ad331e..93711ebe9c 100644 --- a/build/build.xml +++ b/build/build.xml @@ -2,9 +2,9 @@ - - - + + + diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index b00128d292..7722ddc82a 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -28,7 +28,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -@define('PHPBB_VERSION', '3.2.10-RC1'); +@define('PHPBB_VERSION', '3.2.10-RC2'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/install/phpbbcli.php b/phpBB/install/phpbbcli.php index 94f5c6296e..2afe776f85 100755 --- a/phpBB/install/phpbbcli.php +++ b/phpBB/install/phpbbcli.php @@ -23,7 +23,7 @@ if (php_sapi_name() !== 'cli') define('IN_PHPBB', true); define('IN_INSTALL', true); define('PHPBB_ENVIRONMENT', 'production'); -define('PHPBB_VERSION', '3.2.10-RC1'); +define('PHPBB_VERSION', '3.2.10-RC2'); $phpbb_root_path = __DIR__ . '/../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index ed6dc19976..7564613af1 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -306,7 +306,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('update_hashes_lock INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('use_system_cron', '0'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.10-RC1'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.2.10-RC2'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); From 6f96f8b01e3ad4220d8313a4bc0447e968c59591 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 7 Jun 2020 12:05:25 +0200 Subject: [PATCH 11/12] [prep-release-3.2.10] Add migration for 3.2.10-RC2 --- .../phpbb/db/migration/data/v32x/v3210rc2.php | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 phpBB/phpbb/db/migration/data/v32x/v3210rc2.php diff --git a/phpBB/phpbb/db/migration/data/v32x/v3210rc2.php b/phpBB/phpbb/db/migration/data/v32x/v3210rc2.php new file mode 100644 index 0000000000..13b8176912 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v32x/v3210rc2.php @@ -0,0 +1,37 @@ + +* @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\v32x; + +class v3210rc2 extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return phpbb_version_compare($this->config['version'], '3.2.10-RC2', '>='); + } + + static public function depends_on() + { + return array( + '\phpbb\db\migration\data\v32x\font_awesome_update_cdn_fix_depends_on', + '\phpbb\db\migration\data\v32x\v3210rc1', + ); + } + + public function update_data() + { + return array( + array('config.update', array('version', '3.2.10-RC2')), + ); + } +} From 47fcf3403f8177d6c062c7e4e9141502ce2fc338 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 7 Jun 2020 12:11:24 +0200 Subject: [PATCH 12/12] [prep-release-3.2.10] Update changelog for 3.2.10-RC2 --- phpBB/docs/CHANGELOG.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 9c77bbcece..9185ec6a55 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -50,6 +50,7 @@
  1. Changelog