[TYPO3-core] RFC #8040: Bug: Wrong check on creating folders in filelist makes them unaccessible
Moreno Feltscher
moreno.feltscher at gmail.com
Thu Apr 10 08:31:19 CEST 2008
What do you think about replacing dots with an underline if
directories are going to be created?
We had a discussion about that in the german-list.
On Tue, Apr 8, 2008 at 12:19 AM, Moreno Feltscher
<moreno.feltscher at gmail.com> wrote:
>
> 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
>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
>
More information about the TYPO3-team-core
mailing list