Bug #97022
closed.env-variable wont work in yaml for form
0%
Description
I tried to use an .env-variable in `newsletterPopup.form.yaml'.
The variable 'TYPO3_EMAIL_NEWSLETTER_RECIPIENT' works in other yaml-file, which use the YAML-API.
https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Yaml/Index.html
renderingOptions:
submitButtonLabel: Submit
type: Form
identifier: newsletterPopup
label: NewsletterPopup
prototypeName: standard
finishers:
-
options:
subject: Newsletter-Anmeldung
recipients:
%env(TYPO3_EMAIL_NEWSLETTER_RECIPIENT)%: 'newsletter-Anmeldung'
senderAddress: '{email-1}'
senderName: Newsletter-Anmelder
addHtmlPart: true
attachUploads: true
translation:
language: Default
useFluidEmail: false
title: 'Hallo {email-1},'
identifier: EmailToReceiver
...
Updated by Dieter Porth over 2 years ago
I tried to use an .env-variable in `newsletterPopup.form.yaml'.
The variable 'TYPO3_EMAIL_NEWSLETTER_RECIPIENT' works in other yaml-file, which use the YAML-API.
https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Yaml/Index.html
renderingOptions: submitButtonLabel: Submit type: Form identifier: newsletterPopup label: NewsletterPopup prototypeName: standard finishers: - options: subject: Newsletter-Anmeldung recipients: %env(TYPO3_EMAIL_NEWSLETTER_RECIPIENT)%: 'newsletter-Anmeldung' senderAddress: '{email-1}' senderName: Newsletter-Anmelder addHtmlPart: true attachUploads: true translation: language: Default useFluidEmail: false title: 'Hallo {email-1},' identifier: EmailToReceiver renderables: ....
Updated by Oliver Hader over 2 years ago
- Is duplicate of Task #93579: Form framework does not allow to use ENV variables added
Updated by Oliver Hader over 2 years ago
- Status changed from New to Closed
The YAML loader of the form framework does not support env
variables for security reasons.
Oliver Hader, Patchset 4, Aug 08, 2021
Allowing to use instructions like `%env(VARIABLE_NAME)%` by editors would introduce new security vulnerabilities.
This also has been documented at https://docs.typo3.org/c/typo3/cms-form/main/en-us/I/Concepts/Configuration/Index.html#yaml-loading