From 52342dc4e1aa3e65ed64959ff002a91ae49d885f Mon Sep 17 00:00:00 2001 From: Salah Benmoussati <51402489+sbenmoussati@users.noreply.github.com> Date: Mon, 9 May 2022 17:46:47 +0200 Subject: [PATCH] SDA-3221 Preventing navigation to http URLs (#1415) --- src/app/window-utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/window-utils.ts b/src/app/window-utils.ts index a0d60bfe..b1fe7eeb 100644 --- a/src/app/window-utils.ts +++ b/src/app/window-utils.ts @@ -117,9 +117,9 @@ export const preventWindowNavigation = ( ); const listener = async (e: Electron.Event, winUrl: string) => { - if (!winUrl.startsWith('http' || 'https')) { + if (!winUrl.startsWith('https')) { logger.error( - `window-utils: ${winUrl} doesn't start with http or https, so, not navigating!`, + `window-utils: ${winUrl} doesn't start with https, so, not navigating!`, ); e.preventDefault(); return;