[TYPO3-core] RFC #8040: Bug: Wrong check on creating folders in filelist makes them unaccessible

Moreno Feltscher moreno.feltscher at gmail.com
Tue Apr 8 00:19:10 CEST 2008


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/20080408/2525079c/attachment.htm 


More information about the TYPO3-team-core mailing list