mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 16:02:55 +00:00
setWindowOpenHandler granted a native Electron child window for any http(s) URL when the guest owned a registered browser tab. That gave every embedded page the popup privilege OAuth needs, widening the phishing / window-spam surface. Gate the native child on Chromium's 'new-window' disposition — the window.open(features) / shift-click popup pattern OAuth uses. Ordinary target=_blank clicks and featureless window.open() (foreground-tab / background-tab) now route to the OS browser like unregistered guests, while file:/javascript: denial, SAFE_POPUP_WINDOW_OPTIONS, guest policy inheritance, and the unregistered external fallback are preserved. Co-authored-by: Orca <help@stably.ai>