Closed Bug 1587124 Opened 1 year ago Closed 11 months ago

[wpt-sync] Sync PR 19572 - HTML: test MessageChannel and SharedArrayBuffer more

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Attachments

(2 files)

Sync web-platform-tests PR 19572 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/19572
Details from upstream follow.

Anne van Kesteren <annevk@annevk.nl> wrote:

HTML: test MessageChannel and SharedArrayBuffer more

@yutakahirano @dtapuska @domenic @chihweitung @asutherland the final test in what is now window-iframe-messagechannel.https.html in this PR is the most interesting and Chrome fails there, despite @binji claiming in https://github.com/whatwg/html/issues/4209#issuecomment-442508506 that it works in Chrome. (And it doesn't even generate a messageerror event, the SharedArrayBuffer becomes null somehow.)

I'm not really sure what the best course of action for that scenario is and we're hitting a similar thing in https://github.com/whatwg/html/pull/4734 where this enforcement of boundaries becomes even more critical from a security perspective. Basically, it would be really good if we could have enforcement the moment we cross a boundary, regardless of whether the receiving port is active or not. However, this would basically mean specifying the "agent cluster hop" more explicitly and allowing replacing problematic serialized records with errors there in some form.

(An alternative might be not sending anything across until the receiving port is activated (or at least not from the point where a message contains a problematic object), but then implementations still need to have the above kind of enforcement at the boundary to avoid leaking data in the wrong places. This wouldn't be observable so the specification wouldn't have to do that, but it's always suboptimal if there's such a large architectural gap between implementation and specification.)

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Result changes from PR not available.

GitHub CI Results

wpt.fyi PR Results Base Results

Ran 2 tests and 5 subtests

Firefox

OK : 1
FAIL : 4

Chrome

OK : 1
PASS : 3
FAIL : 1

Safari

OK : 1
FAIL : 4

Existing tests that now have a worse result

/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel-success.https.html: Firefox: OK->MISSING, Chrome: OK->MISSING, Safari: OK->MISSING

Other new tests that's don't pass

/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html
postMessaging to a same-site iframe via MessageChannel allows them to see each others' modifications: Firefox: FAIL, Chrome: PASS, Safari: FAIL
postMessaging with a MessageChannel that's been cross-site should succeed: Firefox: FAIL, Chrome: FAIL, Safari: FAIL
postMessaging to a cross-site iframe via MessageChannel should fail: Firefox: FAIL, Chrome: PASS, Safari: FAIL
postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications: Firefox: FAIL, Chrome: PASS, Safari: FAIL

Gecko CI Results

Ran 1 tests and 4 subtests
OK : 1
FAIL : 4

New tests that don't pass

/html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html
postMessaging to a cross-site iframe via MessageChannel should fail: FAIL
postMessaging to a same-origin iframe via MessageChannel allows them to see each others' modifications: FAIL
postMessaging to a same-site iframe via MessageChannel allows them to see each others' modifications: FAIL
postMessaging with a MessageChannel that's been cross-site should succeed: FAIL

Automatic update from web-platform-tests
HTML: test MessageChannel and SharedArrayBuffer more

Closes https://github.com/whatwg/html/issues/4209. (Implementations ought to fix their bugs.)

wpt-commits: f4f35fbf2e05afbf805f1db799f10283364243f9
wpt-pr: 19572

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c181d3a69188
[wpt PR 19572] - HTML: test MessageChannel and SharedArrayBuffer more, a=testonly
https://hg.mozilla.org/integration/autoland/rev/7d216edc7cb0
[wpt PR 19572] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.