[TYPO3-core] RFC: #10313: Fileadmin-module wrongly allows creation of trailing dot directories on UTF8 FS

Steffen Gebert steffen at steffen-gebert.de
Fri Jan 30 21:56:43 CET 2009


Hi,

this is an SVN patch request

Branches: 4.1, 4.2, trunk

Type: Bugfix

BT reference: http://bugs.typo3.org/view.php?id=10313

This was previously discussed under #1280.

Problem: 
TYPO3 doesn't allow using directory names ending with one or more dots.
This is ensured by function t3lib_basicFileFunctions::cleanFileName().

Unfortunately a later added check for UTF-8 file systems (aka $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] == 'utf-8' && $GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']) enables user to create and rename those directories (but not delete, upload etc.).

The attached patch prevents creating such directories or renaming a directory to a new name with trailing dots by removing them (move preg_replace to top of cleanFileName()).

Furthermore PHPDoc description was updated (Thanks to Marcus Krause)

Cheers
Steffen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 10313.diff
Type: text/x-patch
Size: 1736 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090130/f56bd8b5/attachment.bin 


More information about the TYPO3-team-core mailing list