From b4dbd71d11001ccb38fca865c6489a2e3220ecd1 Mon Sep 17 00:00:00 2001 From: kkapsner Date: Fri, 24 May 2019 21:46:34 +0200 Subject: [PATCH] SOP detection did not work all the time Fixes #351 --- lib/frame.js | 3 ++- releaseNotes.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/frame.js b/lib/frame.js index ac7f80a..583c518 100644 --- a/lib/frame.js +++ b/lib/frame.js @@ -127,6 +127,7 @@ function interceptWindow(window){ try { var href = window.location.href; + var wrappedTry = getWrapped(window); } catch (e){ // we are unable to read the location due to SOP @@ -134,7 +135,7 @@ warning("NOT intercepting window due to SOP", window); return false; } - const wrappedWindow = getWrapped(window); + const wrappedWindow = wrappedTry; if (!enabled || interceptedWindows.get(wrappedWindow)){ return false; diff --git a/releaseNotes.txt b/releaseNotes.txt index b461ef0..d4e17aa 100644 --- a/releaseNotes.txt +++ b/releaseNotes.txt @@ -28,6 +28,7 @@ Version 0.5.9: - detection over navigator and DOMRect getters was possible - audio cache could break readout - improved iFrame protection + - SOP detection did not work all the time known issues: - if a data URL is blocked the page action button does not appear