Project

General

Profile

Actions

Bug #96580

open

InsufficientFolderReadPermissionsException during file search as editor

Added by Steffen Hastädt over 2 years ago. Updated about 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2022-01-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

A backend user has only access to one or more specific folders that are shared via "filemount". When this user now uses the file search, the core calls "TYPO3\CMS\Backend\Controller\FileStorage::filterDataAction" which then calls "$this->treeProvider->prepareFolderInformation($nextFolder);" in a loop, to make sure that the parent folders are all accessible.

During this check the method "TYPO3\CMS\Core\Resource::isWithinFileMountBoundaries()" is called with all the parent folders and fails, since it compares the directory names of the filemounts with all the parent folders and the last one is "/". $this->fileMounts will be looped to check the permissions and it contains the folders that are shared with the current backend user.

If the user only has access to subfolders, e.g. "fileadmin/images" and "fileadmin/documents" we create a filemount "images" and a filemount "documents" with the default storage "fileadmin". (This worked fine till TYPO3 v10)

Throughout this configuration the variable $this->fileMounts will now contain the two filemounts and isWithinFileMountBoundaries will compare "/" with "/images" und "/documents" in "typo3/sysext/core/Classes/Resource/ResourceStorage.php line 634" via "$this->driver->isWithin($folder->getIdentifier(), $identifier)" which is now "$this->driver->isWithin("/images", "/") and it will not match and cause an InsufficientFolderReadPermissionsException.

I can prevent the error if I create for every folder an storage and change the filemount to this storage and the folder to "/", but I don't think that this a the right solution for this problem.

Actions #1

Updated by Steffen Hastädt about 2 years ago

"TYPO3\CMS\Core\Resource\ResourceStorage::isWithinFileMountBoundaries()

Actions

Also available in: Atom PDF