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 .. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c2adbb835f..9567f5abe4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -560,7 +560,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: | 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); diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 0d401c86e1..177ae2a0bf 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -430,7 +430,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; }