Project

General

Profile

Actions

Bug #82060

closed

File Abstraction Layer: Extract metadata in storage (scheduler) failing on indexing files that matches denied patterns(['BE']['fileDenyPattern'])

Added by Ricky Mathew over 7 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
scheduler
Start date:
2017-08-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

File Abstraction Layer: Extract metadata in storage (scheduler) fails on trying to index the files in denied pattern(['BE']['fileDenyPattern']) by throwing an exception like following::

_TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsExceptionprototypeobject
message => 'You are not allowed to access that file: "browserdetect.inc.php"' (64 chars)
code => 1375955429 (integer)
_

And my ['BE']['fileDenyPattern'] is "\.(php[3-7]?|phpsh|phtml)(\..*)?$|^\.htaccess$"

We can avoid this by just adding a condition check in runMetaDataExtraction() function in TYPO3\CMS\Core\Resource\Index\Indexer class as follows

$isAllowed = GeneralUtility::verifyFilenameAgainstDenyPattern($indexRecord['name']);

           if($isAllowed){
            $fileObject = $this->getResourceFactory()->getFileObject($indexRecord['uid'], $indexRecord);
            $this->extractMetaData($fileObject);
           }

so can any one please provide a patch with above mentioned solution?


Files

Indexer_patch.patch (695 Bytes) Indexer_patch.patch Ricky Mathew, 2017-08-10 07:31
Actions

Also available in: Atom PDF