Review main Ready for review

92106[BUGFIX] Respect host of BE/entryPoint in backend URIs

Sebastian Fischer CR 0 V 0 Normal +140 −9 updated 11/09/26, 09:15

Commit message

If BE/entryPoint is configured with a host of its own, for example
"https://backend.example.com", backend URIs built during a request
on another origin, such as the admin panel rendered in a frontend
request, pointed to the frontend host and failed with a 404.

The request context of backend routes was always built from the
origin of the current request. It now takes scheme, host and port
from the configured entry point if it contains a host. Absolute URLs
therefore always point to the configured backend origin.

UriBuilder::ABSOLUTE_PATH now generates an absolute URL if the
current request is served from another origin than the backend, as
a path would resolve against the wrong host. Backend requests and
installations with a path-only entry point keep getting paths.

Admin panel AJAX requests to another origin still lack the backend
session cookie and CORS headers. That is not covered by this change.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 7
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/06/92106/7 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/06/92106/7 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Issues 1

Files 4

Review log 815

  1. Sebastian Fischer uploaded patch set 1 12/11/25, 19:57

  2. core-ci voted on patch set 1 V -1 12/11/25, 20:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92085

  3. Oliver Klee updated the commit message in patch set 2 V -1 12/11/25, 20:15

  4. core-ci voted on patch set 2 V -1 12/11/25, 20:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/92087

  5. Oliver Klee rebased onto patch set 3 V -1 02/27/26, 17:21

  6. core-ci voted on patch set 3 V -1 02/27/26, 18:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/96987

  7. Oliver Klee rebased onto patch set 4 V -1 03/01/26, 00:09

  8. core-ci voted on patch set 4 V -1 03/01/26, 00:26 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/97050

  9. Benni Mack updated the commit message in patch set 5 V -1 04/22/26, 07:14

  10. core-ci voted on patch set 5 V -1 04/22/26, 12:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100849

  11. Benni Mack rebased onto patch set 6 V -1 04/28/26, 15:32

  12. core-ci voted on patch set 6 V -1 04/28/26, 15:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101221

  13. Oli Bartsch uploaded patch set 7 V -1 11/09/26, 09:08

  14. Oli Bartsch commented on patch set 7 11/09/26, 09:11

    PS6 passed the full backend URL as Symfony RequestContext baseUrl, which is a path prefix. That doubled scheme/host for absolute URLs and produced relative paths on every installation... Pushed a new set, which keeps the base URL a path and instead takes scheme,host and port from BE/entryPoint when it contains a host. The backendUriBuilder generates an absolute URL for ABSOLUTE_PATH only when the current request is on another origin (e.g. admin panel in the frontend).
  15. core-ci voted on patch set 7 V +1 11/09/26, 09:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113631