Project

General

Profile

Actions

Bug #105432

closed

Resolve placeholders in config/sites/*/csp.yaml

Added by Sebastian Iffland 28 days ago. Updated 23 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Content Security Policy
Target version:
Start date:
2024-10-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
trivial
Is Regression:
Sprint Focus:

Description

Current behavior

The csp.yaml file will not replace placeholders like %env(MY_VAR)%

Expected behavior

The csp.yaml is parsed like the config.yaml and replaces placeholders as described in documentation.

Steps to reproduce

Create config/sites/*/csp.yaml with content like:

inheritDefault: false
mutations:
  - mode: set
    directive: 'default-src'
    sources:
      - "'self'" 
      - '%env(MAIN_SITE_BASE_URI)%'
      - '%env(SUB_SITE_BASE_URI)%'

As seen in sample, especially for multi-site systems, but also in single site environments this is helpful to keep base URL definition in central place which also reduce chance of spelling mistakes while defined in multiple files.

Actions #1

Updated by Gerrit Code Review 28 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86731

Actions #2

Updated by Gerrit Code Review 28 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86731

Actions #3

Updated by Gerrit Code Review 28 days ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86731

Actions #4

Updated by Gerrit Code Review 23 days ago

Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86817

Actions #5

Updated by Gerrit Code Review 23 days ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86818

Actions #6

Updated by Sebastian Iffland 23 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF