Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in the protocol check. #3236

Open
jason-grimm opened this issue Feb 4, 2025 · 0 comments
Open

Bug in the protocol check. #3236

jason-grimm opened this issue Feb 4, 2025 · 0 comments

Comments

@jason-grimm
Copy link

There is an error in the protocol check in the code on line 131 here. A colon : should be added.

win.webContents.setWindowOpenHandler(({ url }) => {
let u = new URL(url);
if (u.protocol == "http" || u.protocol == "https") {
shell.openExternal(url);
} else {
logger.warn(`Prevented opening external URL: ${url}`);
}
return { action: "deny" };
});

u.protocol == "http:" || u.protocol == "https:"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant