Commit 7fedb1b
fix(security): remove allow-same-origin from MCP Apps sandbox iframes
The Lit sample and shared sandbox proxy included allow-same-origin in
iframe sandbox attributes, violating the MCP Apps guide/spec:
- Lit outer iframe: removed sandbox attribute entirely (guide says
don't sandbox the proxy iframe)
- Lit sendSandboxResourceReady: allow-scripts only (was allow-scripts
allow-forms allow-popups allow-modals allow-same-origin)
- Shared sandbox.ts inner iframe default: allow-scripts only (was
allow-scripts allow-same-origin allow-forms)
The Angular sample already correctly used sandbox: 'allow-scripts'.
Confirmed against MCP Apps spec (SEP-1865) and AppBridge SDK docs.
Fixes security discrepancy found by Gemini Code Assist review on #1062.1 parent 29f58e8 commit 7fedb1b
File tree
2 files changed
+2
-3
lines changed- samples/client
- lit/custom-components-example/ui/custom-components
2 files changed
+2
-3
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
| |||
176 | 175 | | |
177 | 176 | | |
178 | 177 | | |
179 | | - | |
| 178 | + | |
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments