Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
- Removed the url security checks as they're stupid and code scanning…
Browse files Browse the repository at this point in the history
… cries about it
  • Loading branch information
coredev-uk committed Aug 5, 2021
1 parent c0b13d1 commit 928e7e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions resources/functions/handler/WindowStateHandler.js
Expand Up @@ -9,11 +9,7 @@ exports.WindowStateHandler = function () {
app.previousPage = app.win.webContents.getURL()

app.win.webContents.setWindowOpenHandler(({url}) => {
if (url.startsWith('https://discord.gg/') || url.startsWith('https://apple.com/') || url.startsWith('https://www.apple.com/') || url.startsWith('https://support.apple.com/') || url.startsWith('https://beta.music.apple.com') || url.startsWith('https://music.apple.com')) { // for security (pretty pointless ik)
shell.openExternal(url).then(() => console.log(`[WindowStateHandler] User has opened ${url} which has been redirected to browser.`));
return {action: 'deny'}
}
console.log(`[WindowStateHandler] User has attempted to open ${url} which was blocked.`)
shell.openExternal(url).then(() => console.log(`[WindowStateHandler] User has opened ${url} which has been redirected to browser.`));
return {action: 'deny'}
})

Expand Down

0 comments on commit 928e7e5

Please sign in to comment.