Closed Bug 2072343 Opened 2 months ago Closed 2 months ago

[wpt-sync] Sync PR 62717 - [WebMCP] Disallow declarative tool registration without allow-scripts

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
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

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

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

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.