Skip to content
Snippets Groups Projects
Commit 5dde3a36 authored by Oliver Hader's avatar Oliver Hader Committed by Stefan Neufeind
Browse files

[BUGFIX] GIFBUILDER files cannot be delivered via web server

GIFBUILDER uses provided file names and text snippets in order to
generate the final name for files to be written to. In case text
snippets start with a dot, this is also reflected into the file
name - preventing some web servers to deliver the file since it's
considered to be internal.

Resolves: #83029
Releases: master, 8.7
Change-Id: Iebed832c1c2429c7400373a6af4d5ae14a9ea18e
Reviewed-on: https://review.typo3.org/54677


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
parent d6c039ff
Branches
Tags
No related merge requests found
......@@ -699,7 +699,7 @@ class GifBuilder extends GraphicalFunctions
/** @var $basicFileFunctions \TYPO3\CMS\Core\Utility\File\BasicFileUtility */
$basicFileFunctions = GeneralUtility::makeInstance(BasicFileUtility::class);
$filePrefix = implode('_', array_merge($this->combinedTextStrings, $this->combinedFileNames));
$filePrefix = $basicFileFunctions->cleanFileName($filePrefix);
$filePrefix = $basicFileFunctions->cleanFileName(ltrim($filePrefix, '.'));
// shorten prefix to avoid overly long file names
$filePrefix = substr($filePrefix, 0, 100);
......
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