diff options
author | gorhill <rhill@raymondhill.net> | 2015-02-07 22:20:24 -0500 |
---|---|---|
committer | gorhill <rhill@raymondhill.net> | 2015-02-07 22:20:24 -0500 |
commit | 6be9a8a9d35635037135bd049b0a2e095e1495e7 (patch) | |
tree | fa4031d3263b00a233c627cbb3ae97d164b1fb8f | |
parent | 4c704dba74d9e4ed8f2d9fb40205afa251b982c4 (diff) | |
download | uBlock-6be9a8a9d35635037135bd049b0a2e095e1495e7.zip uBlock-6be9a8a9d35635037135bd049b0a2e095e1495e7.tar.gz uBlock-6be9a8a9d35635037135bd049b0a2e095e1495e7.tar.bz2 |
this fixes #723
-rw-r--r-- | src/js/background.js | 2 | ||||
-rw-r--r-- | src/js/static-net-filtering.js | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/js/background.js b/src/js/background.js index 6f59ae3..e0b082d 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -115,7 +115,7 @@ return { firstUpdateAfter: 5 * oneMinute, nextUpdateAfter: 7 * oneHour, - selfieMagic: 'jhigubkbgtws', + selfieMagic: 'bizhviclttie', selfieAfter: 7 * oneMinute, pageStores: {}, diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 8f83712..c2d99e1 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1382,8 +1382,16 @@ FilterParser.prototype.parseOptType = function(raw, not) { return; } + // Negated type: set all valid network request type bits to 1 if ( this.types === 0 ) { - this.types = (1 << (typeNameToTypeValue.other >>> 4) + 1) - 1; + // bring origin to 0 (from 4 -- see typeNameToTypeValue) + // add 2 = number of left shift to use + // left-shift 1 by the above-calculated value + // subtract 4 to set all type bits, *except* for 2 lsb + + // https://github.com/gorhill/uBlock/issues/723 + // The 2 lsb *must* be zeroed + this.types = (1 << (typeNameToTypeValue.other >>> 4) + 2) - 4; } this.types &= ~(1 << (type >>> 4)); |