Skip to content

Commit

Permalink
[BUGFIX] Do not hand invalid input to ResourceFactory
Browse files Browse the repository at this point in the history
A phpstan related patch revealed a flaw in EXT:form
PropertyMappingConfiguration when an "EXT:" path was
passed to the FAL ResourceFactory.

Instead of relying on the InvalidArgumentException
this patch now prevents the invalid argument from being
passed in the first place.

Resolves: #92908
Related: #92264
Releases: master, 10.4
Change-Id: I09ff5e28c28e8bbc2de954c1b9077969befb3646
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/66852
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Alexander Schnitzler <git@alexanderschnitzler.de>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
ervaude authored and bmack committed Nov 27, 2020
1 parent 7f2b407 commit 5f92958
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -124,6 +124,10 @@ protected function checkSaveFileMountAccess(string $saveToFileMountIdentifier):
return false;
}

if (strpos($saveToFileMountIdentifier, 'EXT:') === 0) {
return false;
}

$resourceFactory = GeneralUtility::makeInstance(ObjectManager::class)
->get(ResourceFactory::class);

Expand Down

0 comments on commit 5f92958

Please sign in to comment.