Skip to content

Commit

Permalink
fix: ELECTRON-1505 (Prevent opening links longer than 2083) (#775)
Browse files Browse the repository at this point in the history
* ELECTRON-1505 - Prevent opening links longer than 2083

* ELECTRON-1505 - Prevent opening links longer than 2083
  • Loading branch information
KiranNiranjan authored and VishwasShashidhar committed Aug 30, 2019
1 parent 85928f4 commit de5a60f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/child-window-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ export const handleChildWindow = (webContents: WebContents): void => {
}
});
} else {
event.preventDefault();
if (newWinUrl && newWinUrl.length > 2083) {
logger.info(`child-window-handler: new window url length is greater than 2083, not performing any action!`);
return;
}
logger.info(`child-window-handler: new window url is ${newWinUrl} which is not of the same host,
so opening it in the default browser!`);
event.preventDefault();
windowHandler.openUrlInDefaultBrowser(newWinUrl);
}
};
Expand Down

0 comments on commit de5a60f

Please sign in to comment.