Project

General

Profile

Actions

Bug #58872

closed

ResourceStorage::addFile throws exception due invalid file permission check

Added by Rico Sonntag almost 10 years ago. Updated almost 5 years ago.

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

0%

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

Description

/typo3/sysext/core/Classes/Resource/ResourceStorage.php => addFile

A call to addFile

$file = $resourceStorage->addFile(
    $pathToFile,
    $resourceStorage->getRootLevelFolder()
);

throws the exception "File name is invalid." (Code: 1320288991). Parameter $targetFileName is allowed to be empty but $this->assureFileAddPermissions does not take it into account. Instead the targetFileName is evaluated two lines later:

$targetFileName = $this->driver->sanitizeFileName($targetFileName ?: PathUtility::basename($localFilePath));

Do you really test your stuff before you release it (Commit 054207881d3be1d76b8205231c8847947d5c2e4c for instance)? Its a pain to work with TYPO3 6.2 and FAL. Really annoying.

Actions

Also available in: Atom PDF