Project

General

Profile

Actions

Bug #97022

closed

.env-variable wont work in yaml for form

Added by Dieter Porth over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2022-02-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
Remote Sprint

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
...


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Task #93579: Form framework does not allow to use ENV variablesClosedBjörn Jacob2021-02-24

Actions
Actions #1

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:
....
Actions #2

Updated by Oliver Hader over 2 years ago

  • Category set to Form Framework
Actions #3

Updated by Oliver Hader over 2 years ago

  • Is duplicate of Task #93579: Form framework does not allow to use ENV variables added
Actions #4

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.

https://review.typo3.org/c/Packages/TYPO3.CMS/+/68093/4#message-116fc4d8730230d6ebe4879ec46ccbfb8611ec06

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

Actions #5

Updated by Oliver Hader over 2 years ago

  • Sprint Focus set to Remote Sprint
Actions

Also available in: Atom PDF