Review main Ready for review

97760[TASK] Send Cross-Origin-Opener-Policy in backend

Aravind O R CR 0 V 0 Normal +193 −2 updated 11/17/26, 17:13

Commit message

The backend sends no Cross-Origin-Opener-Policy header. A document
outside the backend that opens it with window.open() or a named
target keeps a reference to that window. It can navigate it (for
example to a fake login form), count its frames and post messages
to it.

Add "Cross-Origin-Opener-Policy: same-origin-allow-popups" to the
default backend response headers. Windows opened by the backend
itself, such as records edited in a new window and the frontend
preview, keep their opener. The value "same-origin" would also cut
off the frontend preview window, which the backend reuses through
its window handle and name.

A popup that navigates between a document with the header and one
without it is moved to a new browsing context group and loses its
opener. Records edited in a new window returned to the static file
Close.html, which then could not reload the opener. They now return
to the new backend route "window_close", which is served with the
header.

The changelog lists the known side effects, including a backend
embedded in a frame of another document.

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

Issues 1

Files 6

Review log 12

  1. Aravind O R uploaded patch set 1 11/17/26, 17:07

  2. core-ci voted on patch set 1 V +1 11/17/26, 17:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114766