Skip to content
Snippets Groups Projects
Commit c7b47d6e authored by Andreas Kienast's avatar Andreas Kienast Committed by Benjamin Franzke
Browse files

[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: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent 8dc13c12
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment