From 0110bd957133ecf5dec9eb560a6dfe160c851c65 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Tue, 3 May 2022 14:05:40 -0230 Subject: [PATCH] Fix lint errors --- app/scripts/phishing-detect.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/scripts/phishing-detect.js b/app/scripts/phishing-detect.js index c076a74d4..f926b234d 100644 --- a/app/scripts/phishing-detect.js +++ b/app/scripts/phishing-detect.js @@ -37,13 +37,15 @@ function start() { }); const redirectTarget = new URL(suspect.href, window.location.href); // validate redirect url - const invalidProtocol = !(['https:', 'http:'].includes(redirectTarget.protocol)); + const invalidProtocol = !['https:', 'http:'].includes( + redirectTarget.protocol, + ); // if in valid, show warning and abort if (invalidProtocol) { // we intentionally dont display to the user any potential attacker-written content here console.error(`Invalid redirect url.`); return; - }; + } // use the validated url instance window.location.href = redirectTarget.href; });