[TYPO3-core] RFC #8040: Bug: Wrong check on creating folders infilelist makes them unaccessible
Steffen Kamper
steffen at sk-typo3.de
Thu Apr 10 11:01:41 CEST 2008
hi,
didn't tested yet, but a general question:
same problem could be with "new file"
using dots in the beginning may a problem as they aren't displayed
dots in filenames could cause problems on windows
So i'm fine with replacing dots with _, also spaces , i know this from other apps as well. In filenames only the the last dot for the ext can stay.
vg Steffen
"Moreno Feltscher" <moreno.feltscher at gmail.com> schrieb im Newsbeitrag news:mailman.2487.1207606791.3430.typo3-team-core at lists.netfielders.de...
This is an SVN patch request.
Type: Bugfix
Bugtracker references: http://bugs.typo3.org/view.php?id=8040
Branches: TYPO3_4-1, TYPO3_4-2
Problem: If you create a folder with a dot on the end in the filelist
this works (eg. 6.4.). But if you try to access this folder after
there is no content.
Solution: Add the same way as cleanDirectoryName() needs to check
whether a directory can be displayed to the function which creates a
folder. So if you now try to create a folder like 6.4. TYPO3 will
create it as 6.4 (what I think is the best way).
Cheers
Moreno
--- t3lib/class.t3lib_extfilefunc.php 2008-04-08 02:00:40.000000000 +0200
+++ t3lib/class.t3lib_extfilefunc.php 2008-04-08 01:56:37.000000000 +0200
@@ -695,7 +695,7 @@
function func_newfolder($cmds) {
if (!$this->isInit) return FALSE;
- $theFolder = $this->cleanFileName($cmds['data']);
+ $theFolder = preg_replace('/[\/\.
]*$/','',$this->cleanFileName($cmds['data']));
if ($theFolder) {
if ($this->checkFileNameLen($theFolder)) {
$theTarget = $this->is_directory($cmds['target']); // Check the target dir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20080410/b71b4c13/attachment.htm
More information about the TYPO3-team-core
mailing list