Bug #101035
closedGeneralUtility::getFilesInDir can include files with wrong extension
100%
Description
This Problem came up when I had scss files alongside css files in the same directory, lets say
Resources/Public/Css/Backend/ backend.scss backend.css
and I have $GLOBALS['TBE_STYLES']['skins']
configured to look for css files in this directory to include in the backend. The method will add scss files to the file list as well, because the file extension is not checked literally in (TYPO3 11) GeneralUtility Line 2076 / 2077, but only with a substr from the back against the complete filename. TYPO3 12 is the same.
The attached patch is a possible solution by adding a .
character in front of the extension variable so it will check for the .
as well, eliminating scss from the list in this case. I use this patch in my composer process for TYPO3 11
This is just an example, this could happen with other file extensions where the last literal part is the same.
Files
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80319
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80319
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80319
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80319
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80319
Updated by Gerrit Code Review over 1 year ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80230
Updated by Christian Spoo over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9d289a03d46b41a15195dd3d7ae499ea415cadb0.