Review main Merged

93882[TASK] Normalize backslashes in ZipService::verify()

Oliver Hader CR +2 V +2 Easy +18 −1 updated 04/30/26, 06:24

Commit message

PHP's native ZipArchive::extractTo() already prevents path traversal
and extraction outside the target directory, so backslash sequences
in ZIP entry names do not constitute a security vulnerability.

However, the verify() method's regex checks were forward-slash-only,
meaning backslash-separated traversal sequences (e.g. foo\..\bar.php)
did not trigger the same ExtractException (code 1565709714) that
forward-slash sequences do.

This change normalizes backslashes to forward slashes before pattern
matching so both separator styles raise the same exception consistently.

Review

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

Issues 1

Files 2

Review log 69

  1. Oliver Hader uploaded patch set 1 04/29/26, 14:11

  2. core-ci voted on patch set 1 V -1 04/29/26, 14:21 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101278

  3. Benjamin Franzke voted on patch set 1 CR +1 V +1 04/29/26, 14:46

  4. core-ci voted on patch set 1 V +1 04/29/26, 14:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101278

  5. Oliver Klee updated the commit message in patch set 2 CR +1 V +1 04/29/26, 15:08

  6. Oliver Klee voted on patch set 2 CR +1 V +1 04/29/26, 15:08

  7. core-ci voted on patch set 2 V +1 04/29/26, 15:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/101283

  8. Oliver Hader commented on patch set 2 CR +2 V +2 04/30/26, 06:24

    Thanks folks 😊
  9. Oliver Hader merged patch set 3 04/30/26, 06:24