Security: only open external links that start with https://
This commit is contained in:
parent
40e2235bbe
commit
da0c444215
@ -77,7 +77,9 @@ function createWindow() {
|
||||
console.log('Setting external links to open in default OS browser');
|
||||
contents.on('new-window', (e, url) => {
|
||||
e.preventDefault();
|
||||
if (url.startsWith('https://')) {
|
||||
shell.openExternal(url);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user