[wpt-sync] Sync PR 62717 - [WebMCP] Disallow declarative tool registration without allow-scripts
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox158 fixed)
| Tracking | Status | |
|---|---|---|
| firefox158 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 62717 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/62717
Details from upstream follow.
François Beaufort <beaufort.francois@gmail.com> wrote:
[WebMCP] Disallow declarative tool registration without allow-scripts
ScheduleDeclarativeWebMCPToolRegistration() in HTMLFormElement did not
verify whether scripts are allowed before scheduling declarative WebMCP
tool registration. Consequently, sandboxed iframes without
allow-scripts were able to register declarative WebMCP tools via \<form>
attributes.This CL adds a check for IsSandboxed(WebSandboxFlags::kScripts) to
ScheduleDeclarativeWebMCPToolRegistration() to prevent registration in
contexts where script execution is sandboxed, matching the capability
requirements of the imperative registerTool() API.Bug: 526451590
Change-Id: I5eb9bb96997dc320a7333cd5afc9dcb2c4127869
Reviewed-on: https://chromium-review.googlesource.com/8394892
WPT-Export-Revision: 05b54681f699a26d2765bd2ad0884f700d4509bd
| Assignee | ||
Comment 1•2 months ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=92614
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 1 subtests
Status Summary
Firefox
OK : 1
FAIL : 1
Chrome
TIMEOUT: 2
Safari
OK : 1
FAIL : 1
Links
Details
New Tests That Don't Pass
- /webmcp/declarative/sandboxed-iframe.https.html [wpt.fyi]
- Declarative tool in sandboxed iframe without allow-scripts is not registered:
FAIL(Chrome:TIMEOUT, Safari:FAIL)
- Declarative tool in sandboxed iframe without allow-scripts is not registered:
Comment 4•2 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/dc01f8a9fa3d
https://hg.mozilla.org/mozilla-central/rev/5d18e7f8f9c0
Description
•