Project

General

Profile

Actions

Bug #15695

closed

stdWrap filelist doesn't work directly in fileadmin/

Added by Stefan Klug over 18 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2006-02-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

20080725_filelist_fileadmindir.patch (873 Bytes) 20080725_filelist_fileadmindir.patch Administrator Admin, 2008-07-25 16:07
Actions #1

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 : '';

Actions

Also available in: Atom PDF