Bug #69358
closedstrtolower() breaks German Umlaute in File Pathes
100%
Description
The method canonicalizeAndCheckFileIdentifier($fileIdentifier)
in sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php
uses the php function strtolower()
which corrupts multibyte characters.
Test: call TYPO3\CMS\Core\Resource\File->getForLocalProcessing(false)
for a File with german Umlaut (ä, ö, ü)
Fix: change the line 63 in sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php
from: $fileIdentifier = strtolower($fileIdentifier);
to: $fileIdentifier = mb_strtolower($fileIdentifier);
/** * Makes sure the Path given as parameter is valid * * @param string $fileIdentifier The file path (including the file name!) * @return string * @throws \TYPO3\CMS\Core\Resource\Exception\InvalidPathException */ protected function canonicalizeAndCheckFileIdentifier($fileIdentifier) { if ($fileIdentifier !== '') { $fileIdentifier = $this->canonicalizeAndCheckFilePath($fileIdentifier); $fileIdentifier = '/' . ltrim($fileIdentifier, '/'); if (!$this->isCaseSensitiveFileSystem()) { //$fileIdentifier = strtolower($fileIdentifier); $fileIdentifier = mb_strtolower($fileIdentifier); // fix by Sebastian } } return $fileIdentifier; }
Updated by Gerrit Code Review about 9 years 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 http://review.typo3.org/43114
Updated by Gerrit Code Review about 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43114
Updated by Gerrit Code Review almost 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43114
Updated by Gerrit Code Review almost 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43114
Updated by Gerrit Code Review almost 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43114
Updated by Gerrit Code Review almost 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43114
Updated by Gerrit Code Review almost 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43114
Updated by Gerrit Code Review almost 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43114
Updated by Sebastian Mazza almost 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 84662cff47bc0e955d4ff16597972352cbb02628.