Project

General

Profile

Actions

Bug #51771

closed

Warnings after upgrading to 6.0.9 and browsing filelist with open_basedir in use

Added by Marcus Krause over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-09-05
Due date:
% Done:

0%

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

Description

Following is a PHP Warning which is triggered when browsing filelist with open_basedir enabled.

It seems, we are triggering a bug in open_basedir because in our example resource
/var/www/EXAMPLE.ORG/vhosts/dev/htdocs/fileadmin/_temp_/3.jpg/
is definitely within configured path /var/www/EXAMPLE.ORG/vhosts/dev/

Root cause is obviously an is_dir() call on a file resource which has a trailing slash. There is no file with a slash in its name.

Warning: is_dir(): open_basedir restriction in effect. File(/var/www/EXAMPLE.ORG/vhosts/dev/htdocs/fileadmin/_temp_/3.jpg/) is not within the allowed path(s): (/var/www/EXAMPLE.ORG/vhosts/dev/:/tmp/:/usr/bin/:/usr/share/php5) in /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php on line 390 Call Stack: 0.0001 658528 1. {main}() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/ajax.php:0 0.0956 10510528 2. TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/ajax.php:61 0.0959 10521896 3. call_user_func_array() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Utility/GeneralUtility.php:4044 0.0959 10522040 4. TYPO3\CMS\Backend\Controller\FileSystemNavigationFrameController->ajaxExpandCollapse() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Utility/GeneralUtility.php:0 0.0968 10658720 5. TYPO3\CMS\Backend\Tree\View\FolderTreeView->getBrowsableTree() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php:229 0.0979 10692088 6. TYPO3\CMS\Backend\Tree\View\FolderTreeView->getBrowseableTreeForStorage() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php:222 0.1024 10858112 7. TYPO3\CMS\Backend\Tree\View\FolderTreeView->getFolderTree() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php:317 0.1062 10874912 8. TYPO3\CMS\Backend\Tree\View\FolderTreeView->getNumberOfSubfolders() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php:360 0.1062 10874912 9. TYPO3\CMS\Core\Resource\Folder->getSubfolders() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php:538 0.1062 10875624 10. TYPO3\CMS\Core\Resource\ResourceStorage->getFolderList() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/Folder.php:262 0.1063 10876056 11. TYPO3\CMS\Core\Resource\ResourceStorage->fetchFolderListFromDriver() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/ResourceStorage.php:1752 0.1065 10876136 12. TYPO3\CMS\Core\Resource\Driver\AbstractDriver->getFolderList() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/ResourceStorage.php:1768 0.1065 10876136 13. TYPO3\CMS\Core\Resource\Driver\LocalDriver->getDirectoryItemList() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/Driver/AbstractDriver.php:663 0.1072 10885112 14. TYPO3\CMS\Core\Resource\Driver\LocalDriver->getFolderList_itemCallback() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php:338 0.1072 10885704 15. is_dir() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php:390 Warning: is_dir(): open_basedir restriction in effect. File(/var/www/EXAMPLE.ORG/vhosts/dev/htdocs/fileadmin/_temp_/einkaufen.png/) is not within the allowed path(s): (/var/www/EXAMPLE.ORG/vhosts/dev/:/tmp/:/usr/bin/:/usr/share/php5) in /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/050_core/typo3_src-6.0.9/typo3/sysext/core/Classes/Resource/Driver/LocalDriver.php on line 390 Call Stack: 0.0001 658528 1. {main}() /var/www/EXAMPLE.ORG/vhosts/dev/htdocs/typo3conf/trunk/


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #51761: PHP Warning for open_basedir in filelist for every file after updating 6.1.3 -> 6.1.4Closed2013-09-05

Actions
Actions #1

Updated by Marcus Krause over 10 years ago

Our workarround to hide warnings: replace is_dir() with @is_dir()

Actions #2

Updated by Alexander Opitz over 10 years ago

  • Status changed from New to Closed

Duplicate of #51761

Actions #3

Updated by Kai Vogel over 10 years ago

Seems to be related to #51747

Actions

Also available in: Atom PDF