Bug #85384

verifyFilenameAgainstDenyPattern doesn´t work with UTF-8 strings in Command

Added by Pascal Rinker over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
CLI
Target version:
-
Start date:
2018-06-25
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The pattern inside GeneralUtility::verifyFilenameAgainstDenyPattern should have set the u flag to trade pattern and subject as UTF-8.

You can reproduce this problem by adding a symfony command with the following example code inside the execute() method:

$result will be FALSE with the default deny pattern from TYPO3

$result = GeneralUtility::verifyFilenameAgainstDenyPattern('KÖLSCH.jpg');
var_dump($result);

$result will be TRUE with the default deny pattern from TYPO3

$result = GeneralUtility::verifyFilenameAgainstDenyPattern('KOELSCH.jpg');
var_dump($result);

Adding the u flag to the pattern solves the problem.

My test system was macOS 10.13 with PHP 7.2.4 installed via brew.


Related issues

Duplicates TYPO3 Core - Bug #67061: Upload of files with "Umlaute" is not possible for non-admins when utf8 filesystem is enabled Closed 2015-05-20

History

#1 Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57367

#2 Updated by Mathias Brodala over 1 year ago

  • Duplicates Bug #67061: Upload of files with "Umlaute" is not possible for non-admins when utf8 filesystem is enabled added

#3 Updated by Mathias Brodala over 1 year ago

  • Status changed from Under Review to Closed

See #67061

Also available in: Atom PDF