Bug #15695
closedstdWrap filelist doesn't work directly in fileadmin/
0%
Description
If you try to create a filelist for files located directly in fileadmin it wont work.
reason:
- a / is automatically added to TSFE->lockFilePath
and clean_directory() removes the trailing / from the path given to filelist.
Therefore the comparison in class.tslib_content.php on line 3290
(function filelist) fails.
Solution (down't know if this ist a secure way):
replace the line
$path = substr($path,0,strlen($GLOBALS['TSFE']->lockFilePath))==$GLOBALS['TSFE']->lockFilePath ? $path : '';
by
$path = substr($path,0,strlen($GLOBALS['TSFE']->lockFilePath)-1)==$GLOBALS['TSFE']->lockFilePath ? $path : '';
(issue imported from #M2661)
Files
Updated by Benni Mack over 16 years ago
Basically it should look like:
Before.
$path = substr($path,0,strlen($GLOBALS['TSFE']->lockFilePath))==$GLOBALS['TSFE']->lockFilePath ? $path : '';
After.
$path = t3lib_div::isFirstPartOfStr($path,substr($GLOBALS['TSFE']->lockFilePath, 0, -1)) ? $path : '';