Project

General

Profile

Actions

Bug #101035

closed

GeneralUtility::getFilesInDir can include files with wrong extension

Added by Frank Berger over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-06-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

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

Actions

Also available in: Atom PDF