contao/core — Issue #4029: "&" in folder name forces file manager (Dateiverwaltung) to crash
Author: scribble32
Created: 2012-03-01 16:26:35+00:00
State: open

A customer used the & character in a folder name "Bars & restaurants" which caused the file manager to crash.

Warning: scandir(.....) [function.scandir]: failed to open dir: No such file or directory in ..... on line 243

#0 [internal function]: __error(2, 'scandir(/.....', 243, Array)
#1 ...../system/functions.php(243): scandir('/...')
.....

When u use the & at the beginning, the folder structure of the same level is loaded as subfolder...resulting in this structure

somepage
&archive
&archive
&archive
home
images
home
images
home
images

The system should prevent users from using "&" in their folder names.