Bug #64187
closedRTE "modify link" throws exception if user doesn't have permissions to access filemount
100%
Description
Using TYPO3 6.2.9. When a user presses "Modify link" in a RTE and the link points to a directory/filemount the user doesn't have permission to access, an exception is shown to the user and thus they cannot modify the link:
#1375955684: You are not allowed to access the given folder (More information) TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException thrown in file /var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/core/Classes/Resource/ResourceStorage.php in line 721. 6 TYPO3\CMS\Core\Resource\ResourceStorage::assureFolderReadPermission(TYPO3\CMS\Core\Resource\Folder) /var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/core/Classes/Resource/ResourceStorage.php: 02054: 02055: try { 02056: $this->assureFolderReadPermission($folder); 02057: } catch (Exception\InsufficientFolderAccessPermissionsException $e) { 02058: $folder = NULL; 5 TYPO3\CMS\Core\Resource\ResourceStorage::getFolder("/some/folder/") /var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/core/Classes/Resource/AbstractFile.php: 00546: */ 00547: public function getParentFolder() { 00548: return $this->getStorage()->getFolder($this->getStorage()->getFolderIdentifierFromFileIdentifier($this->getIdentifier())); 00549: } 00550: } 4 TYPO3\CMS\Core\Resource\AbstractFile::getParentFolder() /var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php: 00559: } elseif ($fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\FileInterface) { 00560: // It's a file 00561: $selectedFolder = $fileOrFolderObject->getParentFolder(); 00562: } 00563: } 3 TYPO3\CMS\Rtehtmlarea\BrowseLinks::main_rte() /var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php: 00087: list($modData, $store) = $GLOBALS['SOBE']->browser->processSessionData($modData); 00088: $GLOBALS['BE_USER']->pushModuleData('browse_links.php', $modData); 00089: $this->content = $GLOBALS['SOBE']->browser->main_rte(); 00090: } 00091: } 2 TYPO3\CMS\Rtehtmlarea\Controller\BrowseLinksController::main() /var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/rtehtmlarea/mod3/index.php: 00025: // Make instance: 00026: $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Rtehtmlarea\\Controller\\BrowseLinksController'); 00027: $SOBE->main(); 00028: $SOBE->printContent(); 1 require("/var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/rtehtmlarea/mod3/index.php") /var/www/typo3/docs/typo3_src-6.2.9/typo3/mod.php: 00030: require $temp_path . 'conf.php'; 00031: $BACK_PATH = ''; 00032: require $temp_path . 'index.php'; 00033: $isDispatched = TRUE; 00034: } else {
The user should be able to change the link to a place they do have access to.
This is a regression from TYPO3 4.5.
Updated by Markus Klein almost 10 years ago
- Is Regression changed from Yes to No
Thanks for the report.
Can you please test, if this change works for you?
/var/www/typo3/docs/typo3_src-6.2.9/typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
Replace line line 561 with this code.
try { $selectedFolder = $fileOrFolderObject->getParentFolder(); } catch (\Exception $e) { // Accessing the parent folder failed for some reason. e.g. permissions }
Updated by Markus Klein almost 10 years ago
- Status changed from New to Accepted
- Assignee set to Markus Klein
- Priority changed from -- undefined -- to Must have
- Target version set to next-patchlevel
- Complexity set to easy
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Accepted to Under Review
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/35905
Updated by Gerrit Code Review almost 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/35944
Updated by Gerrit Code Review almost 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/35905
Updated by Gerrit Code Review almost 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/35946
Updated by Markus Klein almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 73d7e226345bc47ced13eaec50378ab9c8d504de.