diff options
author | Chris <chris@chrismatic.io> | 2015-03-01 21:09:28 -0700 |
---|---|---|
committer | Chris <chris@chrismatic.io> | 2015-03-01 21:09:28 -0700 |
commit | 83975124a41e135374f1555f241525b12b5b53a6 (patch) | |
tree | adfb5830157cc7e41629110fb6e3e9304c1e80cc /platform/safari | |
parent | bd0e07bef2e7abb8e771ad8375a9d8a8082ca515 (diff) | |
download | uBlock-83975124a41e135374f1555f241525b12b5b53a6.zip uBlock-83975124a41e135374f1555f241525b12b5b53a6.tar.gz uBlock-83975124a41e135374f1555f241525b12b5b53a6.tar.bz2 |
Safari: XHR should explicitly fail. Fixes #878
Diffstat (limited to 'platform/safari')
-rw-r--r-- | platform/safari/vapi-client.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/platform/safari/vapi-client.js b/platform/safari/vapi-client.js index a6d5d14..6e0eacf 100644 --- a/platform/safari/vapi-client.js +++ b/platform/safari/vapi-client.js @@ -236,7 +236,6 @@ return e.detail.url === false;\ wo = open,\ xo = XMLHttpRequest.prototype.open,\ img = Image;\ -_noOP = function(){};\ Image = function() {\ var x = new img();\ Object.defineProperty(x, 'src', {\ @@ -252,9 +251,9 @@ return x;\ open = function(u) {\ return block(u, 'popup') ? null : wo.apply(this, arguments);\ };\ -XMLHttpRequest.prototype.open = function(m, u, s) {\ -if(block(u, 'xmlhttprequest')) return {send: _noOP};\ -else return xo.apply(this, arguments);\ +XMLHttpRequest.prototype.open = function(m, u) {\ +if(block(u, 'xmlhttprequest')) {throw 'InvalidAccessError'; return;}\ +else {xo.apply(this, arguments); return;}\ };"; if(frameId === 0) { tmpScript += "\ |