Skip to content

Commit

Permalink
SOP detection did not work all the time
Browse files Browse the repository at this point in the history
Fixes #351
  • Loading branch information
kkapsner committed May 24, 2019
1 parent be2f4d8 commit b4dbd71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,15 @@
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
// therefore we also can not intercept anything.
warning("NOT intercepting window due to SOP", window);
return false;
}
const wrappedWindow = getWrapped(window);
const wrappedWindow = wrappedTry;

if (!enabled || interceptedWindows.get(wrappedWindow)){
return false;
Expand Down
1 change: 1 addition & 0 deletions releaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4dbd71

Please sign in to comment.