Bug #52309
closedFolders created from BE with wrong permissions
100%
Description
Hi, all.
I have found following issue in FAL Filelist module: creation of files is done with correct permissions, but when it comes to folders creation TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions() fails because following condition fails: if (self::isAllowedAbsPath($path))
, which is the result of a wrong parameter, passed as $path.
It passes: /absPath/parentFolder//newFolder
And, since double slashes are not allowed in self::validPathStr($path), fixPermissions() makes no effect.
Updated by Steffen Ritter almost 11 years ago
- Status changed from New to Needs Feedback
this probably won't be fixed in 6.0 and 6.1 anymore;
but please check if this is still the case - the canonicalization of identifiers should have fixed that.
Updated by Viktor Livakivskyi almost 11 years ago
Yes, it is still the case in 6.0.11.
Double slash is still passed to TYPO3\CMS\Core\Utility\GeneralUtility::fixPermissions()
Updated by Tilo Baller almost 11 years ago
Problem still exists in 6.1.7. Couldn't test in 6.2.x yet.
How to test:- set
$GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] = '2775'
inLocalConfiguration.php/AdditionalConfiguration.php
- create a folder with Filelist module in Backend
- created folder should have permissions according to folderCreateMask
typo3/sysext/core/Classes/Resource/Driver/Localdriver.php->createFolder()
\TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($this->getAbsoluteBasePath() . $newFolderPath);
$this->getAbsoluteBasePath()
has a trailing slash$newFolderPath
has a leading slash- this causes resulting paths with double slash, e.g.
"[...]/fileadmin//test_create_folder/"
- the
LocalDriver->createFolder()
function callsGeneralUtility::mkdir()
GeneralUtility::mkdir()
callsself::fixPermissions()
self::fixPermissions()
callsself::isAllowedAbsPath($path)
self::isAllowedAbsPath($path)
fails because the$path
contains '//' and returns falsefixPermissions()
function aborts and does not apply thefolderCreateMask
setting to the newly created folder
typo3/sysext/core/Classes/Resource/Driver/Localdriver.php->createFolder()
line 212 (@6.1.7)- use
LocalDriver->getAbsolutePath()
which takes care of correct concatenation - before:
\TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($this->getAbsoluteBasePath() . $newFolderPath);
- after:
\TYPO3\CMS\Core\Utility\GeneralUtility::mkdir($this->getAbsolutePath($newFolderPath));
Updated by Gerrit Code Review almost 11 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/27042
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27042
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27042
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32917
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32918
Updated by Gerrit Code Review about 10 years ago
Patch set 4 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/27042
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32917
Updated by Gerrit Code Review almost 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32917
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/32918
Updated by Benni Mack almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 59671a2dfe152f01207a520c544967ba6b35f301.