#101035GeneralUtility::getFilesInDir can include files with wrong extension
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.
Reviews 2
Files 1
History 39
-
Benni Mack changed Sprint Focus On Location Sprint 08/02/23, 14:46
-
Gerrit Code Review pushed patch set 1 for main to change 80319 status
NewUnder Review 08/03/23, 19:01 -
Gerrit Code Review pushed patch set 2 for main to change 80319 08/03/23, 19:10
-
Gerrit Code Review pushed patch set 3 for main to change 80319 08/03/23, 19:18
-
Gerrit Code Review pushed patch set 4 for main to change 80319 08/03/23, 19:19
-
Gerrit Code Review pushed patch set 5 for main to change 80319 08/03/23, 19:23
-
Gerrit Code Review pushed patch set 1 for 12.4 to change 80230 08/03/23, 19:28
-
Christian Spoo commented and changed status
Under ReviewResolved done0 %100 % 08/03/23, 19:30 -
Benni Mack changed status
ResolvedClosed 07/09/24, 14:15
Applied in changeset commit:9d289a03d46b41a15195dd3d7ae499ea415cadb0.