From 86fb9ed1881b511c68b3d31c67e12f62d94bb15f Mon Sep 17 00:00:00 2001 From: Stefan Hagspiel Date: Mon, 13 May 2024 20:57:39 +0200 Subject: [PATCH] fix exception handler priority --- .github/workflows/codeception.yml | 5 +++-- .github/workflows/ecs.yml | 5 +++-- .github/workflows/php-stan.yml | 5 +++-- UPGRADE.md | 3 +++ .../EventListener/Frontend/ResponseExceptionListener.php | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeception.yml b/.github/workflows/codeception.yml index e0aa409..d15918d 100644 --- a/.github/workflows/codeception.yml +++ b/.github/workflows/codeception.yml @@ -1,9 +1,9 @@ name: Codeception on: push: - branches: [ 'master' ] + branches: [ '4.x' ] pull_request: - branches: [ 'master' ] + branches: [ '4.x' ] jobs: codeception: @@ -120,6 +120,7 @@ jobs: TEST_PIMCORE_VERSION: ${{ matrix.pimcore }} TEST_SYMFONY_VERSION: ${{ matrix.symfony }} run: | + sed -i 's|"require-dev": {|"conflict": {"league/csv": ">=9.11.0"},\n "require-dev": {|' ${{ github.workspace }}/lib/test-bundle/composer.json chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh ./pimcore-codeception-framework/src/_etc/scripts/composer.sh diff --git a/.github/workflows/ecs.yml b/.github/workflows/ecs.yml index 61d6aa1..33fe3ba 100644 --- a/.github/workflows/ecs.yml +++ b/.github/workflows/ecs.yml @@ -1,9 +1,9 @@ name: Easy Coding Standards on: push: - branches: [ 'master' ] + branches: [ '4.x' ] pull_request: - branches: [ 'master' ] + branches: [ '4.x' ] jobs: ecs: @@ -103,6 +103,7 @@ jobs: TEST_PIMCORE_VERSION: ${{ matrix.pimcore }} TEST_SYMFONY_VERSION: ${{ matrix.symfony }} run: | + sed -i 's|"require-dev": {|"conflict": {"league/csv": ">=9.11.0"},\n "require-dev": {|' ${{ github.workspace }}/lib/test-bundle/composer.json chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh ./pimcore-codeception-framework/src/_etc/scripts/composer.sh diff --git a/.github/workflows/php-stan.yml b/.github/workflows/php-stan.yml index 5de9a43..afa30ca 100644 --- a/.github/workflows/php-stan.yml +++ b/.github/workflows/php-stan.yml @@ -1,9 +1,9 @@ name: PHP Stan on: push: - branches: [ 'master' ] + branches: [ '4.x' ] pull_request: - branches: [ 'master' ] + branches: [ '4.x' ] jobs: stan: @@ -103,6 +103,7 @@ jobs: TEST_PIMCORE_VERSION: ${{ matrix.pimcore }} TEST_SYMFONY_VERSION: ${{ matrix.symfony }} run: | + sed -i 's|"require-dev": {|"conflict": {"league/csv": ">=9.11.0"},\n "require-dev": {|' ${{ github.workspace }}/lib/test-bundle/composer.json chmod +x ./pimcore-codeception-framework/src/_etc/scripts/composer.sh ./pimcore-codeception-framework/src/_etc/scripts/composer.sh diff --git a/UPGRADE.md b/UPGRADE.md index b42861c..92a1502 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,8 @@ # Upgrade Notes +## 4.1.10 +- [BUGFIX] Fix exception handler priority to prevent authentication exception hijacking + ## 4.1.9 - [BUGFIX] Move preview listener to earlier state to allow static route preview with restricted sites diff --git a/src/I18nBundle/EventListener/Frontend/ResponseExceptionListener.php b/src/I18nBundle/EventListener/Frontend/ResponseExceptionListener.php index 0c3d7f5..4bb998e 100644 --- a/src/I18nBundle/EventListener/Frontend/ResponseExceptionListener.php +++ b/src/I18nBundle/EventListener/Frontend/ResponseExceptionListener.php @@ -59,7 +59,7 @@ public function __construct( public static function getSubscribedEvents(): array { return [ - KernelEvents::EXCEPTION => ['onKernelException', 10] + KernelEvents::EXCEPTION => 'onKernelException' ]; }