Review main Merged

90645[BUGFIX] Fix url check in GeneralUtility::sanitizeLocalUrl

Thomas Hohn CR +2 V +2 Easy +29 −5 updated 09/15/25, 13:21

Commit message

The url check introduced via the patch
"Fix open redirection via GeneralUtility::sanitizeLocalUrl"
was to restrictive with respect to blank spaces.

Instead the check is divided into 2 cases, which now
allows blank spaces, when encoded properly.

Review

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

Issues 2

Files 2

Review log 1215

  1. Thomas Hohn uploaded patch set 1 09/09/25, 15:07

  2. core-ci voted on patch set 1 V +1 09/09/25, 15:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84719

  3. Oliver Klee commented on patch set 1 09/09/25, 15:36

    Could we cover this with a regression test?
  4. Thomas Hohn commented on patch set 1 09/09/25, 16:13

    Reply

    I would like to see if the approach is ok first 😊
  5. Thomas Hohn uploaded patch set 2 V +1 09/09/25, 17:04

  6. core-ci voted on patch set 2 V +1 09/09/25, 17:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84736

  7. Thomas Hohn commented on patch set 2 09/09/25, 18:42

    Reply

    Done
  8. Benjamin Franzke commented on patch set 2 CR -1 09/10/25, 07:48

    Thanks for the patch! I'm on it to review this
  9. Benjamin Franzke uploaded patch set 3 CR -1 V +1 09/10/25, 09:12

  10. Benjamin Franzke commented on patch set 3 09/10/25, 09:12

    Reply

    reworked a bit, lgtm now. thx!

    GeneralUtilityTest.php:1406

    The test below tries to use the plain URL and an explicitly encoded one, that means these cases must not be encoded. I've changed it accordingly.
  11. core-ci voted on patch set 3 V +1 09/10/25, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/84766

  12. Thomas Hohn commented on patch set 3 09/10/25, 10:02

    Reply

    Thx - just testet it and it works as before
  13. Oliver Hader voted on patch set 3 CR +1 V +1 09/15/25, 09:15

  14. Benjamin Franzke voted on patch set 3 CR +2 V +2 09/15/25, 12:59

  15. Benjamin Franzke merged patch set 4 09/15/25, 13:21