Bug #90330
openWrong publicUrl for FAL files in non-public storages generated from CLI
0%
Description
In at least TYPO3 9.5.13 fetching the public url of a FAL \TYPO3\CMS\Core\Resource\File
located in a non-public storage using $file->getPublicUrl()
from the commandline in a Symfony command returns
http:///var/www/example.org/www/typo3/sysext/core/bin/index.php?eID=dumpFile&t=f&f=[fileUid]&token=[token]
Using $file->getPublicUrl(TRUE)
returns
../../../../http://var/www/example.org/www/typo3/sysext/core/bin/index.php?eID=dumpFile&t=f&f=[fileUid]&token=[token]
Last changes to that area were done in
https://review.typo3.org/c/Packages/TYPO3.CMS/+/57240/11/typo3/sysext/core/Classes/Resource/ResourceStorage.php#1304
https://review.typo3.org/c/Packages/TYPO3.CMS/+/53140/8/typo3/sysext/core/Classes/Resource/ResourceStorage.php#1297
https://review.typo3.org/c/Packages/TYPO3.CMS/+/53789/5/typo3/sysext/core/Classes/Resource/ResourceStorage.php#1304
This should be a valid URL not mangling local file paths with eID-GET-Parameters.
For TYPO3 9+ it probably should take site configuration in account, otherwise it would even help if at least just the relative path
/index.php?eID=dumpFile&t=f&f=[fileUid]&token=[token]
would be returned