mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-17 05:58:41 -09:00
Fix electron window.open vulnerability (#3457)
* Fix electron window.open vulnerability * Comment to remove fix when merged into Hyper3
This commit is contained in:
parent
1a82866fec
commit
17fcae570b
1 changed files with 4 additions and 0 deletions
|
|
@ -226,6 +226,10 @@ module.exports = class Window {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// mitigate a security issue: https://electronjs.org/blog/window-open-fix
|
||||||
|
// TODO: remove when merged into Hyper 3 (already has the fix via electron)
|
||||||
|
window.webContents.on('-add-new-contents', e => e.preventDefault());
|
||||||
|
|
||||||
// expose internals to extension authors
|
// expose internals to extension authors
|
||||||
window.rpc = rpc;
|
window.rpc = rpc;
|
||||||
window.sessions = sessions;
|
window.sessions = sessions;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue