Review 10.4 Merged

77160[BUGFIX] Fix absolute backend URL generation in frontend context

Benjamin Franzke CR +2 V +2 Easy +37 −3 updated 12/15/22, 10:06

Commit message

$normalizedParams->getRequestDir() returns '/' for frontend
requests and `/typo3/` for backend requests. This results in
problems when the backend UriBuilder relies on getRequestDir()
to provide the `/typo3/` suffix for backend URL generation.

UriBuilder is now changed to base absolute URLs on
getSiteUrl(), which is defined to return equal values
for backend and frontend requests, the typo3 suffix
is added manually.

Note that v12 introduced similar behavior with #99234,
where UriBuilder was adapted to use BackendEntryPointResolver,
which rebases the backend URL calculation on the site path as well.

Also note that the ABSOLUTE_URL mode in backend UriBuilder isn't
actually used by the TYPO3 frontend, but some extensions started
to execute system reports in frontend context, which
exposed this bug with the introduction of #99347.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Oliver Hader +1
    • André Buchmann +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Oliver Hader +1
    • André Buchmann +1
    • core-ci +1 CI

Issues 3

Files 2

Review log 1216

  1. Benjamin Franzke uploaded patch set 1 12/14/22, 21:31

  2. core-ci voted on patch set 1 V -1 12/14/22, 21:53 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35123

  3. Benjamin Franzke uploaded patch set 2 V -1 12/14/22, 21:56

  4. core-ci voted on patch set 2 V -1 12/14/22, 22:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35132

  5. Benjamin Franzke uploaded patch set 3 V -1 12/15/22, 05:23

  6. core-ci voted on patch set 3 V +1 12/15/22, 05:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35145

  7. Oliver Hader voted on patch set 3 CR +1 12/15/22, 08:07

  8. André Buchmann voted on patch set 3 V +1 CR +1 12/15/22, 08:28

  9. Benjamin Franzke uploaded patch set 4 CR +1 V +1 12/15/22, 08:48

  10. Oliver Hader voted on patch set 4 CR +1 12/15/22, 08:51

  11. Benjamin Franzke uploaded patch set 5 CR +1 12/15/22, 08:52

  12. Oliver Hader voted on patch set 5 V +1 CR +1 12/15/22, 08:56

  13. core-ci voted on patch set 5 V +1 12/15/22, 09:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/35156

  14. André Buchmann voted on patch set 5 V +1 CR +1 12/15/22, 10:05

  15. Benjamin Franzke voted on patch set 5 V +2 CR +2 12/15/22, 10:06

  16. Benjamin Franzke merged patch set 6 12/15/22, 10:06