Issue Bug Closed

#101035GeneralUtility::getFilesInDir can include files with wrong extension

Frank Berger 06/13/23, 15:36 updated 07/09/24, 14:15

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

  1. Benni Mack changed Sprint Focus On Location Sprint 08/02/23, 14:46

  2. Gerrit Code Review pushed patch set 1 for main to change 80319 status New Under Review 08/03/23, 19:01

  3. Gerrit Code Review pushed patch set 2 for main to change 80319 08/03/23, 19:10

  4. Gerrit Code Review pushed patch set 3 for main to change 80319 08/03/23, 19:18

  5. Gerrit Code Review pushed patch set 4 for main to change 80319 08/03/23, 19:19

  6. Gerrit Code Review pushed patch set 5 for main to change 80319 08/03/23, 19:23

  7. Gerrit Code Review pushed patch set 1 for 12.4 to change 80230 08/03/23, 19:28

  8. Christian Spoo commented and changed status Under Review Resolved done 0 % 100 % 08/03/23, 19:30

    Applied in changeset commit:9d289a03d46b41a15195dd3d7ae499ea415cadb0.

  9. Benni Mack changed status Resolved Closed 07/09/24, 14:15