Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix statement in sanitizeFileName #6

Open
wants to merge 1 commit into
base: v1.3.x
Choose a base branch
from

Conversation

Prettycode-KC
Copy link

Seems like sanitizeFileName() fal_ftp/Classes/Driver/FTPDriver.php can not handle filenames like '0', which is likely to happen when typo3 creates _processed folders dynamically.

I assume this part causes the trouble:
if (!$cleanFileName) { throw new \TYPO3\CMS\Core\Resource\Exception\InvalidFileNameException( 'File name ' . $cleanFileName . ' is invalid.', 1320288991 ); }

@adgrafik
Copy link
Owner

Hi! Thanks for supporting!
The reason of "!" instead of FALSE ist that preg_replace don't return FALSE. I think
strlen($cleanFileName) === 0
should slove the problem. Can you fix this and try it again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants