Review main Merged

93617[TASK] Deprecate GU::sanitizeLocalUrl() without request

Christian Kuhn CR +2 V +2 Normal +109 −57 updated 04/11/26, 06:57

Commit message

Similar to #109523, GeneralUtility::sanitizeLocalUrl() hides
a dependency to request by using GeneralUtility::getIndpEnv().
The patch makes this dependency explicit with a deprecated b/w
compat layer.

Technically, GU::sanitizeLocalUrl() consumers are straight
forward to adapt: The method is used to sanitize the
'returnUrl' argument in requests, the request is
available in all cases.

However, we should probably think about a new solution
of the 'where to return?' task: It would probably be a better
idea to sign the argument server-side up-front and just verify
when incoming. This would avoid the guesswork done by
sanitizeLocalUrl() entirely and could increase security.
A topic for v15, probably.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 26

Show 6 more files

Review log 79

  1. Christian Kuhn uploaded patch set 1 04/10/26, 19:25

  2. Christian Kuhn uploaded patch set 2 04/10/26, 19:28

  3. core-ci voted on patch set 2 V +1 04/10/26, 19:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99931

  4. core-ci voted on patch set 1 V -1 04/10/26, 20:01 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/99930

  5. Stefan Bürk voted on patch set 2 CR +1 V +1 04/10/26, 20:29

  6. Simon Schaufelberger voted on patch set 2 CR +1 V +1 04/10/26, 22:56

  7. Anja Leichsenring voted on patch set 2 CR +1 V +1 04/11/26, 04:45

  8. Christian Kuhn voted on patch set 2 CR +2 V +2 04/11/26, 06:57

  9. Christian Kuhn merged patch set 3 04/11/26, 06:57