Issue Bug Closed

#92908Using EXT: in allowedExtensionPaths causes exception with 10.4.10

Stefan Hekele 11/23/20, 15:16 updated 12/22/20, 11:02

Description

FormEngineSetup.yaml:

TYPO3:
  CMS:
    Form:
      persistenceManager:
        allowedExtensionPaths:
          10: 'EXT:my_form/Resources/Private/Forms/'
        allowSaveToExtensionPaths: false
        allowDeleteFromExtensionPaths: false

This worked up to and including 10.4.9.

However, upon installing 10.4.10, the frontend now instead displays the following exception upon loading a page with a predefined form:

(1/1) #1314516810 TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException
Folder “/my_form/Resources/Private/Forms/” does not exist.

I traced the relevant change back to /typo3/sysext/core/Classes/Resource/ResourceFactory.php::getFolderObjectFromCombinedIdentifier()

At line 504, what used to be
$storageUid = $parts[0];
has been changed to
$storageUid = (int)$parts[0];
in commit https://github.com/TYPO3/TYPO3.CMS/commit/a79c665c9abe112fbdf8f8a45ce734b6030a0606

This causes the EXT part of the config to be cast to 0, meaning that the is_numeric() in TYPO3\CMS\Core\Resource\ResourceFactory::getStorageObject() is no longer throwing an Exception – which itself was caught by TYPO3\CMS\Form\Mvc\Property\PropertyMappingConfiguration::checkSaveFileMountAccess() -, and instead the path is resolved and checked against storage uid 0, where it naturally can’t be found.

Reviews 2