Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid value for TSconfig default_upload_folders.defaultForAllTables generates 503 #46

Open
jpmschuler opened this issue Jun 15, 2023 · 2 comments
Assignees

Comments

@jpmschuler
Copy link

jpmschuler commented Jun 15, 2023

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.

@FamousWolf
Copy link
Contributor

This sounds like a wrong configuration, not a bug in the extension. If I've got a wrong configuration I'd want to get an error message, so I can fix the configuration as soon as possible.

@FamousWolf FamousWolf self-assigned this Jun 19, 2023
@jpmschuler
Copy link
Author

This sounds like a wrong configuration

Yes like the issue label says.

I'd want to get an error

Yes. I want that error. Thus, it should not be an exception, but handleable. Comparable problems in core result in log messages with severity warning instead, not in exceptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants