[TYPO3-core] RFC #8040: Bug: Wrong check on creating folders in filelist makes them unaccessible
Dmitry Dulepov [typo3]
dmitry at typo3.org
Tue Apr 22 11:09:39 CEST 2008
Hi!
Moreno Feltscher wrote:
> OK, new patch attached. Now directories and files with ending dots are
> going to created in a Windows friendly way.
<skip>
> - return preg_replace('/[^.[:alnum:]_-]/','_',trim($fileName));
> + $fileName = preg_replace('/[^.[:alnum:]_-]/','_',trim($fileName));
I am not sure that old a new code is correct. I checked PHP manual and it declares support for "alnum: only for "ereg" family of functions. Possibly it is left after conversion from old "ereg" code. I think it should be:
+ $fileName = preg_replace('/[^\w-]/', '_', trim($fileName));
Also notice spaces after commas.
--
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"
More information about the TYPO3-team-core
mailing list