Bug #89461
closedErrors with mixed case file names in case-insensitive storage
0%
Description
In a setup with a file storage, which is NOT defined as case-sensitive, there are several scenarios, in which mixed case file names aren't handled correctly.
My premise is: it's always a realistic scenario that mixed case file names can be found in a storage. e.g. if FTP uploads into a storage are possible. TYPO3 must be able to handle this correctly.
We can break the problem down into several test cases:
1. Mixed case file is uploaded in BE
Result: file name is converted to lower case, sys_file record is created correctly (ie. with lower case identifier + name). Everything works correctly.
2. Mixed case file is uploaded via FTP (Linux)
Result: accessing the target directory in the Filelist module will result in "Oops, an error occurred! File /MyTest.txt does not exist." No sys_file record is created. BE access to the directory is blocked (also to all other files/subdirectories!), as long as the uploaded file remains there unchanged.
This must be considered a bug. The best solutions would probably be to automatically rename the file to lower case and create the sys_file record accordingly. (This would basically be the same behaviour as with BE uploads.)
3. Mixed case file is uploaded via FTP (Windows)
Result: a sys_file record is created, but identifier + name are lower case, while the name of the physical file remains mixed case.
For the moment the file can be used in file references and it works in the FE. But the situation is far from optimal as the sys_file record doesn't reflect the reality of the file system (which will lead to errors, if the site is migrated from Windows to Linux). This can result in follow-up problems, eg. if the storage is later changed to case-sensitive. If the directory is accessed in the BE, a new sys_file record will be created (correctly with mixed case identifier + name). However the old record (with lower case identifier + name) remains, which must also be considered a bug, as there is no corresponding file in the file system. If the 'Update storage index' task is run, the file is not marked as missing, which must also be considered a bug.