From ad794c17edf444cf9c585d10f016c85e6a206df2 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 15 Jan 2023 21:34:48 +0100 Subject: [PATCH 1/4] [ticket/17091] Limit doctrine/instantiator to 1.x versions PHPBB3-17091 --- .github/setup-phpbb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/setup-phpbb.sh b/.github/setup-phpbb.sh index c74f29d5cf..2fc1634978 100755 --- a/.github/setup-phpbb.sh +++ b/.github/setup-phpbb.sh @@ -31,6 +31,6 @@ php ../composer.phar install --dev --no-interaction if [[ "$PHP_VERSION" =~ ^nightly$ || "$PHP_VERSION" =~ ^8 ]] then php ../composer.phar remove phpunit/dbunit --dev --update-with-dependencies \ - && php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs + && php ../composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs fi cd .. From 61a7e0fdfc3bf20fa0d2b58f553e07ed97ff68b4 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 15 Jan 2023 22:00:21 +0100 Subject: [PATCH 2/4] [ticket/17091] Update windows build commands as well PHPBB3-17091 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6f351d036d..8a2a2f7e0a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -548,7 +548,7 @@ jobs: cd ${env:GITHUB_WORKSPACE}\phpBB php ..\composer.phar install php ..\composer.phar remove phpunit/dbunit --dev --update-with-dependencies - php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 --dev --update-with-all-dependencies --ignore-platform-reqs + php ..\composer.phar require symfony/yaml:~4.4 misantron/dbunit:~5.0 phpunit/phpunit:^9.3 doctrine/instantiator:^1.4 --dev --update-with-all-dependencies --ignore-platform-reqs cd .. - name: Setup database run: | From e091adcc9c0c0dde02947da4bf3bf726aef379e3 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 16 Jan 2023 16:54:40 +0100 Subject: [PATCH 3/4] [ticket/17091] Add kernel terminate logic and exit to cron response handling PHPBB3-17091 --- phpBB/cron.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/phpBB/cron.php b/phpBB/cron.php index b74796fb78..0543455006 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -31,6 +31,12 @@ $cron_type = $request->variable('cron_type', ''); $get_params_array = $request->get_super_global(\phpbb\request\request_interface::GET); +/* @var $http_kernel \Symfony\Component\HttpKernel\HttpKernel */ +$http_kernel = $phpbb_container->get('http_kernel'); + +/* @var $symfony_request \phpbb\symfony_request */ +$symfony_request = $phpbb_container->get('symfony_request'); + /** @var \phpbb\controller\helper $controller_helper */ $controller_helper = $phpbb_container->get('controller.helper'); $cron_route = 'phpbb_cron_run'; @@ -42,6 +48,8 @@ try Response::HTTP_MOVED_PERMANENTLY ); $response->send(); + $http_kernel->terminate($symfony_request, $response); + exit(); } catch (RouteNotFoundException $exception) { @@ -68,3 +76,4 @@ $response = new Response( $error_code ); $response->send(); +$http_kernel->terminate($symfony_request, $response); From 8ebb64a92a6fe1aeae56b14dcea53ad5123982bf Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 16 Jan 2023 16:55:16 +0100 Subject: [PATCH 4/4] [ticket/17091] Ensure session length is int PHPBB3-17091 --- phpBB/phpbb/session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 8e3815efd2..6f25d3b650 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -420,7 +420,7 @@ class session // Else check the autologin length... and also removing those having autologin enabled but no longer allowed board-wide. if (!$this->data['session_autologin']) { - if ($this->data['session_time'] < $this->time_now - ($config['session_length'] + 60)) + if ($this->data['session_time'] < $this->time_now - ((int) $config['session_length'] + 60)) { $session_expired = true; }