[BUGFIX] File identifiers are case-insensitive 98/23398/10
authorAndreas Wolf <andreas.wolf@typo3.org>
Wed, 28 Aug 2013 11:25:37 +0000 (13:25 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 12 Nov 2013 15:19:01 +0000 (16:19 +0100)
commit958847e5c8886aa1524494153586e215732edb46
treee5660cd30f92659f9ec23a71cd120db9f8b8a5e9
parente35c0d3ab5bd7fe946505fd7442813598881f42f
[BUGFIX] File identifiers are case-insensitive

With the default collations used by most databases, casing is ignored.
This leads to problems when searching for an entry in the file database:
If there are two files with the same name in different casings, only one
of the two will be indexed. This index record will be used for both
files, as the database does not see a difference when querying for their
identifiers.

The problem is solved by this commit with the help of a new field
identifier_hash. To also solve the problems arising on case-insensitive
file systems (where all casings are possible and thus the same file
could be indexed multiple times when being created with differently
cased identifiers), file identifiers for these storages are converted to
all-lowercase before hashing.

Change-Id: I805085948e01544efd692498f5e3537612c62050
Resolves: #43027
Resolves: #46553
Resolves: #45504
Releases: 6.2
Reviewed-on: https://review.typo3.org/23398
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Markus Klein
Tested-by: Markus Klein
22 files changed:
typo3/sysext/core/Classes/Resource/AbstractFile.php
typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php
typo3/sysext/core/Classes/Resource/Driver/AbstractHierarchicalFilesystemDriver.php
typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php
typo3/sysext/core/Classes/Resource/File.php
typo3/sysext/core/Classes/Resource/FileReference.php
typo3/sysext/core/Classes/Resource/Folder.php
typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php
typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php
typo3/sysext/core/Classes/Resource/ResourceInterface.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/IndexerService.php
typo3/sysext/core/Classes/Resource/StorageRepository.php
typo3/sysext/core/Configuration/Resource/Driver/LocalDriverFlexForm.xml
typo3/sysext/core/Tests/BaseTestCase.php
typo3/sysext/core/Tests/Unit/Resource/Driver/DriverRegistryTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceFactoryTest.php
typo3/sysext/core/Tests/Unit/Resource/ResourceStorageTest.php
typo3/sysext/core/ext_tables.sql
typo3/sysext/install/Classes/Updates/FileIdentifierHashUpdate.php [new file with mode: 0644]
typo3/sysext/install/ext_localconf.php
typo3/sysext/lang/locallang_mod_file_list.xlf