--- a/Classes/Utility/GeneralUtility.php +++ b/Classes/Utility/GeneralUtility.php (date 1676644649547) @@ -2076,8 +2076,9 @@ } foreach ($allowedFileExtensionArray as $allowedFileExtension) { + $allowedFileExtension = '.'.$allowedFileExtension; if ( - ($extensionList === ',,' || stripos($extensionList, ',' . substr($entry, strlen($allowedFileExtension) * -1, strlen($allowedFileExtension)) . ',') !== false) + ($extensionList === ',,' || strtolower(substr($entry, strlen($allowedFileExtension) * -1)) === $allowedFileExtension) && ($excludePattern === '' || !preg_match('/^' . $excludePattern . '$/', $entry)) ) { if ($order !== 'mtime') {