diff --git a/typo3/sysext/filelist/Classes/Controller/FileListController.php b/typo3/sysext/filelist/Classes/Controller/FileListController.php index 778456415feb..b69e9dd7c025 100644 --- a/typo3/sysext/filelist/Classes/Controller/FileListController.php +++ b/typo3/sysext/filelist/Classes/Controller/FileListController.php @@ -142,6 +142,7 @@ public function __construct() { * * @return void * @throws \RuntimeException + * @throws Exception\InsufficientFolderAccessPermissionsException */ public function init() { // Setting GPvars: @@ -163,9 +164,12 @@ public function init() { } $this->folderObject = $fileFactory->getFolderObjectFromCombinedIdentifier($storage->getUid() . ':' . $identifier); + // Disallow access to fallback storage 0 + if ($storage->getUid() === 0) { + throw new Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access files outside your storages', 1434539815); + } // Disallow the rendering of the processing folder (e.g. could be called manually) - // and all folders without any defined storage - if ($this->folderObject && ($storage->getUid() === 0 || $storage->isProcessingFolder($this->folderObject))) { + if ($this->folderObject && $storage->isProcessingFolder($this->folderObject)) { $this->folderObject = $storage->getRootLevelFolder(); } } else {