Review main Ready for review

97995[BUGFIX] Use page origin in preview module frame-src

Matthias Vogel CR 0 V 0 Normal +54 −2 updated 11/25/26, 08:33

Commit message

The backend module "Content > Preview" adds the full URI of the page
to the CSP directive `frame-src`. This URI contains the path of the
page. It also contains a query, for example `type=98` when the page
TSconfig sets `mod.web_view.type = 98`. When the frontend uses a host
other than the backend, these problems occur:

- A CSP source with a path allows only this one path. Thus the
  browser blocks a link in the frame to another page on the same host.
- A query is not valid in a CSP source. Chrome ignores the query and
  shows a warning in the console.

Now the module adds only the origin of the page to `frame-src`: the
scheme, the host and the port.
Show more Show less

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 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/95/97995/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/95/97995/1 && 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 7

Issues 1

Files 3

Review log 12

  1. Matthias Vogel uploaded patch set 1 11/25/26, 08:24

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