Review main Merged

83846[BUGFIX] Properly check (real)paths in `LocalCropScaleMaskHelper`

Andreas Kienast CR +2 V +2 Easy +3 −1 updated 04/22/24, 15:44

Commit message

With patches #102679 and arguably #103351, the image processing got
refactored at multiple locations with good intentions. However, this
triggers a bug in case `fileadmin/` is symlinked as it removes original
files from `fileadmin/` due to incomplete checks.

The class `LocalCropScaleMaskHelper` compares two paths to check whether
further processing needs to be done. One part of the condition is the
path "as-is", the other one is the real path with symlinks being
resolved, leading to a negative result albeit both paths point to the
exact same file.

Another condition to trigger this bug is to render images in the
frontend that don't need processing at all, e.g. because their
dimensions are small enough.

This patch converts the original file name in `LocalCropScaleMaskHelper`
to a real path as well to have a successful comparison in symlink
scenarios.

Review

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

Issues 1

Files 1

Review log 68

  1. Andreas Kienast uploaded patch set 1 04/17/24, 12:04

  2. core-ci voted on patch set 1 V +1 04/17/24, 12:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56157

  3. Andreas Kienast updated the commit message in patch set 2 V +1 04/22/24, 14:33

  4. Benjamin Franzke uploaded patch set 3 04/22/24, 14:47

  5. Benni Mack voted on patch set 3 CR +1 V +1 04/22/24, 15:17

  6. Benjamin Franzke voted on patch set 3 CR +2 V +2 04/22/24, 15:37

  7. core-ci voted on patch set 3 V +1 04/22/24, 15:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/56499

  8. Benjamin Franzke merged patch set 4 04/22/24, 15:44