Lock main window to the Sunburn origin #13

Merged
adam merged 1 commit from ai/issue-6 into master 2026-10-03 11:57:27 -04:00
Owner

Closes #6

  • New src/origin.js (exact-origin check, replaces prefix startsWith) with node tests (npm test).
  • App-wide web-contents-created guard: window.open denied (Sunburn URLs load in place, others go to system browser), will-navigate/will-redirect blocked off-origin.
  • Permission and display-media handlers require a Sunburn requesting origin; saved URL validated on load.

Not run in Electron (only npm test, node --check). Risk: OAuth popups are now denied and go to the system browser; test login. Overlaps #9 on SUNBURN_ORIGIN in main.js; use the one from src/origin.js when rebasing.

🤖 Generated with Claude Code

Closes #6 - New `src/origin.js` (exact-origin check, replaces prefix `startsWith`) with node tests (`npm test`). - App-wide `web-contents-created` guard: `window.open` denied (Sunburn URLs load in place, others go to system browser), `will-navigate`/`will-redirect` blocked off-origin. - Permission and display-media handlers require a Sunburn requesting origin; saved URL validated on load. Not run in Electron (only `npm test`, `node --check`). Risk: OAuth popups are now denied and go to the system browser; test login. Overlaps #9 on SUNBURN_ORIGIN in main.js; use the one from src/origin.js when rebasing. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
adam changed title from WIP: Lock main window to the Sunburn origin to Lock main window to the Sunburn origin 2026-10-03 11:54:57 -04:00
adam merged commit 7d91939592 into master 2026-10-03 11:57:27 -04:00
adam deleted branch ai/issue-6 2026-10-03 11:57:27 -04:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
adam/sunburn-desktop!13
No description provided.