[TYPO3-core] RFC: #1280: Deleting directories ending in a dot in fileadmin-module impossible

Francois Suter fsuter at cobweb.ch
Fri Jan 30 21:05:15 CET 2009


Hi,

> Sorry, I'm not happy with this one. Let my explain why:
> 
> The bug report complains that directories with a dot at the end are not
> deletable. But this patch doesn't resolve this problem. What it does is
> simply not allowing to create such folders.
> 
> Either the bug report has to be modified (to sth. like "TYPO3 wrongly
> allows directories with a dot at the end") or you have to fix the bug
> itself.

You're right. There was a lot of discussion about this bug report on IRC 
and the result of the discussion appears unclear here. We probably 
should have opened a new RFC and proposed dropping the original bug 
report. Here's why:

- when you look at the various functions that clean up file and 
directory names in t3lib, you can see that it is clearly wanted in the 
TYPO3 core to strip trailing dots from the file and directory names.
- in revision 1811 a new test was added to check UTF-8 file names. This 
introduced an early return in function 
t3lib_basicFileFunctions::cleanFileName() which then didn't go through 
stripping of trailing dots. This made it possible to create files and 
directories with trailing dots.
- when deleting a folder, you don't go through the same process, which 
means trailing dots are stripped, the name then doesn't match and the 
offending directory can't be deleted.
- so actually the real fix is to prevent the creation (or renaming) of 
files and folders with trailing dots, not to enable their deletion.
- of course, it is still possible for people to create "badly"-named 
files and directories via FTP or other such access, but then they can 
also be deleted that way is such a case.

Does that make more sense?

Cheers

-- 

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


More information about the TYPO3-team-core mailing list