Lock main window to the Sunburn origin #6
Labels
No labels
ai
ai:in-progress
ai:in-review
ai:merging
ai:needs-attention
cleanup
performance
security
severity/high
severity/low
severity/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
adam/sunburn-desktop#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem: No
setWindowOpenHandler/will-navigateguard, and the permission handler grants media/display-capture/notifications to any origin.Impact: A link clicked in chat (or any navigation) opens a third-party site inside Electron, inheriting the preload bridge and auto-granted camera/mic/screen permissions.
Fix:
setWindowOpenHandler→shell.openExternalfor non-Sunburn URLs,deny.will-navigate→ block anything outsidehttps://chat.galactica.host.webContents.getURL()origin before granting.loadLastUrl()is on the Sunburn origin before loading.Where:
main.js:28-47Fixed by #13 (#13)