{{ message }}
Commit 8cf7731
fix(core): guard against DOM clobbering in declareExperimentalWebMcpTool
Previously, the modelContext truthiness check could be bypassed via DOM
clobbering (e.g. `<form id="modelContext">`), causing a truthy HTMLElement
to pass the guard and then throw when `registerTool` was called on it.
Replace the truthiness check with a duck-type check that asserts
`registerTool` is a function, rejecting both absent and clobbered values.1 parent 1e79dd3 commit 8cf7731
1 file changed
Lines changed: 4 additions & 2 deletions

0 commit comments