Review main Ready for review Stale

93733[BUGFIX] Omit incompatible directives from report-only CSP

André Buchmann CR 0 V 0 Normal +58 −3 updated 09/14/26, 08:59

Commit message

Directives `upgrade-insecure-requests` and `sandbox` must not appear
in `Content-Security-Policy-Report-Only` headers per the CSP spec.
When both enforcement and reporting are enabled, browsers emit:

  The Content Security Policy directive 'upgrade-insecure-requests'
  is ignored when delivered in a report-only policy.

Add `Directive::isApplicableForDisposition()` and pass the target
disposition to `Policy::compile()` so incompatible directives are
skipped when building report-only headers. The argument defaults to
`Disposition::enforce`, which is what the remaining callers in the
install tool deliver.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/33/93733/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/33/93733/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 4

Issues 1

Files 5

Review log 48

  1. André Buchmann uploaded patch set 1 04/18/26, 21:13

  2. core-ci voted on patch set 1 V +1 04/18/26, 21:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100463

  3. Benni Mack updated the commit message in patch set 2 V +1 04/22/26, 06:47

  4. core-ci voted on patch set 2 V +1 04/22/26, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100795

  5. Georg Ringer uploaded patch set 3 V +1 09/09/26, 16:04

  6. core-ci voted on patch set 3 V +1 09/09/26, 16:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108205

  7. Georg Ringer rebased onto patch set 4 V +1 09/14/26, 08:47

  8. core-ci voted on patch set 4 V +1 09/14/26, 08:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/108504