Skip to content

Invalid value for TSconfig default_upload_folders.defaultForAllTables generates 503 #46

@jpmschuler

Description

@jpmschuler

By accident I had a scenario where a site had an invalid setting for default_upload_folders.defaultForAllTables. In general I set this via site config settings like

default_upload_folders.defaultForAllTables = 1:/sites/{$orga.config.abbreviation}/

So normally it gets replaced to 1:/sites/foo/. However for one single site this setting wasn't set and thus the value was 1:/sites/{$orga.config.abbreviation}/ (without var replacement, so a string with curly brackets and dollar sign).

This resulted in editors getting a 503 as soon as an TCEForm with an upload field was opened:

[CRITICAL] request="76c6c2b1de5e7" component="TYPO3.CMS.Core.Error.ProductionExceptionHandler": 
Core: Exception handler (WEB: BE): TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException, 
code #1375955684, file /private/typo3/sysext/core/Classes/Resource/ResourceStorage.php, line 857:
You are not allowed to access the given folder: ""

(Seemingly the folder name was anonymised to "" as it was broken).

Probably an easy check if the folder exists before checking the TYPO3 permissions would solve this, unsetting the configuration value if it is invalid for further processing.

Currently no time for PR, perhaps next week.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions