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

Francois Suter fsuter at cobweb.ch
Mon Feb 2 22:50:42 CET 2009


Hi,

> 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()).

+1 after reading and testing. However I feel like the function could use 
a restructuring for the trunk. I think this early return inside the 
UTF-8 block is confusing. Anyone opposing that?

A side note: I also tested this patch on an installation with the DAM 
and the DAM is actually called inside the File module too. When the DAM 
is called, it is possible to rename folders to names with trailing dots. 
I'll do a patch for the DAM separately.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-team-core mailing list