-
Notifications
You must be signed in to change notification settings - Fork 0
IsolationTest: parent origin access can throw in sandboxed iframes #188
Copy link
Copy link
Open
Description
Problem
In IsolationTest.tsx, reading window.parent.location.origin can throw synchronously in sandboxed cross-origin iframes. This path is not guarded with try/catch.
Additionally, isIsolated doesn't include canFetchParentOrigin in its predicate, so the status can report "isolated" even when that specific check fails or passes unexpectedly.
Location
registry/outputs/isolated/IsolationTest.tsx
Suggested Fix
-
Wrap parent-origin derivation in try/catch:
let parentOrigin: string | null = null; try { parentOrigin = window.parent.location?.origin ?? null; } catch { parentOrigin = null; // Expected in sandboxed iframe }
-
Include
!testResult.canFetchParentOriginin theisIsolatedpredicate and checklist
Severity
Low - this is a test/diagnostic component, not user-facing functionality. But it can cause confusing results when diagnosing isolation issues.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels