diff --git a/src/app/child-window-handler.ts b/src/app/child-window-handler.ts index 9f9ed28f0..3b89c2886 100644 --- a/src/app/child-window-handler.ts +++ b/src/app/child-window-handler.ts @@ -193,6 +193,10 @@ export const handleChildWindow = (webContents: WebContents): void => { } }); } else { + 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(); diff --git a/src/app/protocol-handler.ts b/src/app/protocol-handler.ts index 5d1609f97..b5bb50eea 100644 --- a/src/app/protocol-handler.ts +++ b/src/app/protocol-handler.ts @@ -41,6 +41,10 @@ class ProtocolHandler { * @param isAppRunning {Boolean} - whether the application is running */ public sendProtocol(url: string, isAppRunning: boolean = true): void { + if (url && url.length > 2083) { + logger.info(`protocol-handler: protocol handler url length is greater than 2083, not performing any action!`); + return; + } logger.info(`protocol handler: processing protocol request for the url ${url}!`); if (!this.preloadWebContents || !isAppRunning) { logger.info(`protocol handler: app was started from the protocol request. Caching the URL ${url}!`);