Project

General

Profile

Actions

Bug #101035

closed

GeneralUtility::getFilesInDir can include files with wrong extension

Added by Frank Berger 11 months ago. Updated 9 months ago.

Status:
Resolved
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 #1

Updated by Benni Mack 9 months ago

  • Sprint Focus set to On Location Sprint
Actions #2

Updated by Gerrit Code Review 9 months 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

Actions #3

Updated by Gerrit Code Review 9 months 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

Actions #4

Updated by Gerrit Code Review 9 months 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

Actions #5

Updated by Gerrit Code Review 9 months 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

Actions #6

Updated by Gerrit Code Review 9 months 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

Actions #7

Updated by Gerrit Code Review 9 months 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

Actions #8

Updated by Christian Spoo 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF