Repository navigation
Commit 7962e83
committed
Media: Broaden the Document-Isolation-Policy header to all admin pages.
Send the Document-Isolation-Policy (DIP) header on every admin page via
`admin_init` rather than only on the four block-editor screens
(`load-post.php`, `load-post-new.php`, `load-site-editor.php`, and
`load-widgets.php`).
Hooking the narrow set of screens placed the editor in its own browser
agent cluster while sibling admin navigations (site editor sub-routes,
template and pattern operations) loaded without the header. The agent
cluster mismatch broke cross-window communication and SharedArrayBuffer
access required for WebAssembly-based client-side media processing in
Chromium 137+.
The block-editor screen gate is replaced by an `upload_files` capability
check, since cross-origin isolation is only needed for users who can
upload media. The existing escape hatch for third-party page builders
that override the block editor via a custom `action` query parameter is
retained.
The front-end preview is intentionally out of scope; DIP remains an
admin-only concern.
See related Gutenberg pull request: WordPress/gutenberg#76662.1 parent e904e28 commit 7962e83
3 files changed
Lines changed: 14 additions & 20 deletions
File tree
- src/wp-includes
- tests/phpunit/tests/media
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
| 701 | + | |
705 | 702 | | |
706 | 703 | | |
707 | 704 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6533 | 6533 | | |
6534 | 6534 | | |
6535 | 6535 | | |
6536 | | - | |
| 6536 | + | |
6537 | 6537 | | |
6538 | 6538 | | |
6539 | 6539 | | |
6540 | 6540 | | |
6541 | 6541 | | |
| 6542 | + | |
| 6543 | + | |
| 6544 | + | |
| 6545 | + | |
| 6546 | + | |
6542 | 6547 | | |
6543 | 6548 | | |
6544 | 6549 | | |
| |||
6550 | 6555 | | |
6551 | 6556 | | |
6552 | 6557 | | |
6553 | | - | |
6554 | | - | |
6555 | | - | |
6556 | | - | |
6557 | | - | |
6558 | | - | |
6559 | | - | |
| 6558 | + | |
| 6559 | + | |
6560 | 6560 | | |
6561 | 6561 | | |
6562 | 6562 | | |
| |||
6569 | 6569 | | |
6570 | 6570 | | |
6571 | 6571 | | |
6572 | | - | |
6573 | | - | |
6574 | | - | |
6575 | | - | |
6576 | | - | |
6577 | 6572 | | |
6578 | 6573 | | |
6579 | 6574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
0 commit comments