Project

General

Profile

Actions

Bug #59547

closed

Different identifier hashes while indexing files

Added by Oliver Schulz over 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2014-06-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

I found a bug while migrating DAM to FAL:

1) I index files via scheduler task or by just clicking some folders in file module. New files are recognized and updated. At this time the identifier hash for a record is created by "sha1_file" method.
Start:
\TYPO3\CMS\Core\Resource\Index\Indexer::processChangesInStorages()
Ends here:
\TYPO3\CMS\Core\Resource\Driver\LocalDriver::hash()

2) I index files by "$this->storageObject->getFile($identifier); This method searches for a record, when the record is missing, it will be created in this process. The difference here is the identifier hash is created by sha1 method.
Start:
\TYPO3\CMS\Core\Resource\ResourceStorage::getFile
Ends here:
\TYPO3\CMS\Core\Resource\Driver\AbstractDriver::hashIdentifier()

But the problem is now the german language, when there are umlauts in the identifier string, both methods return different hashes.

A solution for this bug is to use only one of these methods, i fixed it temporally bei changing following line:

/typo3_src/typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php:155
return sha1($identifier);
into
return $this->hash($identifier, 'sha1');

I know this is not the best way, but i don't have a good overview of the FAL implementation to create a stable patch.

Actions

Also available in: Atom PDF