Conversation
Contributor
Test in WordPress PlaygroundTest the plugin with the code from this branch:
|
This was referenced Sep 26, 2026
erseco
force-pushed
the
hotfix/admin-preview-opaque-origin
branch
from
September 26, 2026 07:20
df425b5 to
9bf8b40
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## hotfix/style-package-nested-allowlist #138 +/- ##
========================================================================
Coverage 96.87% 96.87%
Complexity 864 864
========================================================================
Files 39 39
Lines 4322 4324 +2
========================================================================
+ Hits 4187 4189 +2
Misses 135 135
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
erseco
added this pull request to stack #144
September 26, 2026 07:38
erseco
force-pushed
the
hotfix/admin-preview-opaque-origin
branch
from
September 26, 2026 08:01
cbee48f to
9f8fb53
Compare
The editor modal accepted a relayed request-save from any window, and the bridge inside the editor iframe accepted save/export/project-info commands from any sender. The modal now only accepts the relay from its own window and origin; the bridge only from its parent, and from the declared parent origin when one is configured.
erseco
force-pushed
the
hotfix/admin-preview-opaque-origin
branch
from
September 26, 2026 08:28
9f8fb53 to
fa38125
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #137.
Security fix: check who sends postMessage
assets/js/exelearning-editor.js: the editor modal accepted a relayed{source:'wp-exe-editor', type:'request-save'}from any window or origin. It now accepts it only from its own window and origin (the standalone editor page relays Ctrl+S that way).assets/js/wp-exe-bridge.js: the bridge inside the editor iframe acceptedWP_REQUEST_SAVE,WP_REQUEST_EXPORT,GET_PROJECT_INFOandCONFIGUREfrom any sender. It now accepts them only fromwindow.parent, and from the declared parent origin when one is configured.Replies already went only to the parent origin, so nothing leaked. The impact was forced saves or exports driven by a foreign window.
Out of scope: previews stay same-origin
An earlier version of this PR also dropped
allow-same-originfrom the wp-admin package previews. That was reverted. Packages need storage and cookies (teacher mode, scored iDevices), embedded video needs the parent relay, and Playground cannot serve opaque-origin subframes. The opaque-origin viewer lands as a whole in #56.Verification
npm run test:js: 245 passed, including new tests showing that the bridge and the modal ignore foreign senders or origins.