93527[BUGFIX] Avoid invalidly showing login form when opening a shared link
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Benjamin Kott +1
- Benni Mack +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Benjamin Kott +1
- Benni Mack +1
- core-ci +1 CI
Issues 1
Files 9
- Build/tests/playwright/e2e/login/redirect.spec.tsnew+31 −0
- typo3/sysext/backend/Classes/Http/Security/ReferrerEnforcer.php+1 −1
- typo3/sysext/backend/Classes/Http/RouteDispatcher.php+0 −3
- typo3/sysext/backend/Configuration/Backend/Routes.php+2 −0
- typo3/sysext/backend/Tests/Unit/Http/Security/ReferrerEnforcerTest.php+35 −17
- typo3/sysext/core/Classes/Http/Security/ReferrerEnforcer.php+11 −1
- typo3/sysext/install/Classes/Http/Security/ReferrerEnforcer.php+1 −1
- typo3/sysext/install/Classes/Middleware/Maintenance.php+1 −1
- typo3/sysext/install/Tests/Unit/Http/Security/ReferrerEnforcerTest.php+34 −3
Review log 1826
Show 1 earlier messages
-
Benjamin Franzke uploaded patch set 1 04/02/26, 14:00
-
Benjamin Franzke wrote 04/02/26, 14:00
Hashtag added: actions -
core-ci voted on patch set 1 V +1 04/02/26, 14:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99497
-
Benni Mack marked it work in progress 04/22/26, 06:45
-
Benjamin Franzke uploaded patch set 2
V +108/27/26, 11:50 -
core-ci voted on patch set 2 V -1 08/27/26, 12:00 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107263
-
Benjamin Franzke uploaded patch set 3
V -108/27/26, 12:11 -
core-ci voted on patch set 3 V +1 08/27/26, 12:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107265
-
Benjamin Franzke uploaded patch set 4
V +108/31/26, 08:52 -
core-ci voted on patch set 4 V +1 08/31/26, 08:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107392
-
Benjamin Kott uploaded patch set 5
V +109/07/26, 17:41 -
core-ci voted on patch set 5 V +1 09/07/26, 17:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108020
-
Benjamin Kott voted on patch set 5 CR +1 V +1 09/07/26, 18:07
-
Benjamin Franzke commented on patch set 5 CR -1 09/07/26, 20:08
Thanks for the review. -1 for now, since I noticed – while writing a test – that we delete cookies on the "first" cross-site request (when the browser decides to exclude the cookie header), which is usually ignored by browsers, but not by playwright e2e testing. That means we can not correctly test this, but also shows there's more to consider and maybe we should rethink possibilties via `SameSite=lax`. -
Benjamin Franzke commented on patch set 5 09/07/26, 20:10
Reply
For reference, this could be a respective test: (e.g. `Build/tests/playwright/e2e/login/redirect.spec.ts`) ``` import { test, expect } from '@playwright/test'; import config from '../../config'; test.describe('Backend login route redirect', () => { test('route redirect works', async ({ page }) => { await page.goto(config.baseUrl + 'module/file/list'); // Expect the Media URL to be active await expect(page.locator('.modulemenu-action-active')).toHaveText('Media'); }); test('route redirect works cross domain', async ({ page }) => { await page.route('http://cross-site.test/';, async route => { await route.fulfill({ status: 200, body: `<a href="${config.baseUrl}module/file/list">Test link</a>`, headers: { 'content-type': 'text/html', }, }); }); await page.goto('http://cross-site.test/';); await page.getByRole('link', { name: 'Test link' }).click(); // Expect the Media URL to be active await expect(page.locator('.modulemenu-action-active')).toHaveText('Media'); }); }); ``` -
Benjamin Franzke uploaded patch set 6
CR +1V +109/08/26, 19:06 -
Benjamin Franzke commented on patch set 6 09/08/26, 19:07
Reply
For reference, the test is now fixed by a pre-patch that assured that cookies are strictly cleared, but only if the request actually contained cookie information: https://review.typo3.org/c/Packages/TYPO3.CMS/+/95713/1..2 -
core-ci voted on patch set 6 V +1 09/08/26, 19:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108113
-
Benjamin Franzke rebased onto patch set 7
V +109/09/26, 11:42 -
core-ci voted on patch set 7 V +1 09/09/26, 11:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108162
-
Benjamin Franzke rebased onto patch set 8
V +109/15/26, 06:53 -
core-ci voted on patch set 8 V +1 09/15/26, 07:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108578
-
Benjamin Kott voted on patch set 8 CR +1 V +1 09/15/26, 07:54
-
Benni Mack voted on patch set 8 CR +1 V +1 09/15/26, 10:23
-
Benjamin Franzke voted on patch set 8 CR +2 V +2 09/15/26, 11:57
-
Benjamin Franzke merged patch set 9 09/15/26, 11:58