Commit f9bb723f authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[BUGFIX] Enforce processing images stored in typo3temp

When rendering preview images of online-media assets (YouTube, etc.),
the corresponding image is retrieved from the remote host and stored
in typo3temp. In case configured dimension and file extension of the
target file are not different, the image won't be processed and thus
not stored in a public FAL storage.

Resolves: #99550
Releases: main, 11.5
Change-Id: Ib2e28b2e5d2bc4ea96207917ca8f26f407f53856
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77386


Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Jörg Bösche's avatarJörg Bösche <typo3@joergboesche.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
parent e4a5f3e4
......@@ -117,7 +117,9 @@ class LocalCropScaleMaskHelper
$configuration['height'] ?? '',
$configuration['additionalParameters'],
$configuration['frame'] ?? '',
$options
$options,
// in case file is in `/typo3temp/`, it must create a result
$this->isTemporaryFile($originalFileName)
);
} else {
$targetFileName = $this->getFilenameForImageCropScaleMask($task);
......@@ -274,4 +276,9 @@ class LocalCropScaleMaskHelper
}
return $parameters;
}
protected function isTemporaryFile(string $filePath): bool
{
return str_starts_with($filePath, Environment::getPublicPath() . '/typo3temp/');
}
}
Supports Markdown
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