Review 14.3 Merged

97574[BUGFIX] Only check used capture groups for unsafe redirect regex

Benni Mack CR +2 V +2 Normal +61 −1 updated 11/12/26, 13:42

Commit message

The warning about unsafe capturing groups was logged for every
match of a regexp redirect, including match zero, which always
contains the query string when "Respect GET parameters" is set.

Capture groups not referenced in the redirect target are now
skipped, so the warning is only logged when a used group would
leak query parameters into the target URL.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 57

  1. Benni Mack commented on patch set 1 11/12/26, 10:32

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php
  2. core-ci voted on patch set 1 V -1 11/12/26, 10:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114177

  3. Benni Mack uploaded patch set 2 V -1 11/12/26, 13:34

  4. core-ci voted on patch set 2 V +1 11/12/26, 13:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114188

  5. Benni Mack marked it ready for review 11/12/26, 13:41

  6. Benni Mack voted on patch set 2 CR +2 V +2 11/12/26, 13:42

  7. Benni Mack merged patch set 3 11/12/26, 13:42