[BUGFIX] Properly check (real)paths in `LocalCropScaleMaskHelper`
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. Resolves: #103648 Releases: main Change-Id: I81e7f9d3e8951a0a0f18fe2838925f272659028e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83846 Reviewed-by:Benjamin Franzke <ben@bnf.dev> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benjamin Franzke <ben@bnf.dev> Tested-by:
Benni Mack <benni@typo3.org>
Please register or sign in to comment