X Tutup
Skip to content

Bug in the protocol check. #3236

@jason-grimm

Description

@jason-grimm

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:"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup