1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-29 22:27:12 +02:00
Commit Graph

231 Commits

Author SHA1 Message Date
Raymond Hill
27e8c8d468
Normalize tabless xhr to image/media in onHeadersReceived()
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/610

The service worker-related issue affects both
Chromium/Firefox: the type of resources fetched
from a service worker are uniformly set to
`xmlhttprequest`, hence losing a key piece of
information for the purpose of accurate content
filtering.
2019-05-31 09:02:07 -04:00
Raymond Hill
4430ec11e2
Rearrange inner loop of static network filtering engine
The motivations for the re-arrangement:

- Reducing the number of entry points:
  matchStringExactString() has been removed and
  matchString() is simply reused with a modifier parameter
  to enable matching variants.

- Presumption that most matches, if any, occur early with
  the left-most tokens in a URL. This gives a very small
  marginal performance gain as per built-in benchmark.
2019-05-22 17:51:03 -04:00
Raymond Hill
915c1f1f3c
Report resources blocked by csp= option in logger
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/552
2019-05-11 10:40:34 -04:00
Raymond Hill
fff2bb6290
Assume media elements with no Content-Length header to be of size 0
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/543
2019-04-24 08:30:54 -04:00
Raymond Hill
875542c964
Code review of fix for https://github.com/uBlockOrigin/uBlock-issues/issues/459
Relocate workaround to the code responsible to compute filtering context, such
that the workaround will also be applied in other code paths, for example  also
for webRequest.onHeadersReceived.
2019-03-14 11:24:13 -04:00
Raymond Hill
9a7887eb39
Better English in comment 2019-03-13 17:21:30 -04:00
Raymond Hill
f5974a500b
Fix https://github.com/uBlockOrigin/uBlock-issues/issues/459 2019-03-13 17:17:37 -04:00
Raymond Hill
87feb47b51
Support disabling suspendTabsUntilReady in Firefox
The value of `suspendTabsUntilReady` was disregarded in Firefox and
uBO defaulted to always defer tab loading until it was ready.

This commit allows to disable the deferring of tab loading in
Firefox. The new valid values for `suspendTabsUntilReady` are:
- `unset`: leave it to the platform to pick the optimal
  behavior (default)
- `no`: do no suspend tab loading at launch time
- `yes`: suspend tab loading at launch time
2019-02-19 12:30:37 -05:00
Raymond Hill
515b7cdcfc
Use proper embedding context when evluating inline-script
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/422
2019-02-15 07:37:43 -05:00
Raymond Hill
ed5d63df69
Grand refactoring of the logger
Performance-related work: the logger data has been decoupled
from the DOM -- inspired from CodeMirror's way of efficiently
handling large amout of text data.

This decoupling now makes the logger highly efficient CPU- and
memory-wise, and open the way to more possibilities.

Ability to configure some aspect of the logger behavior and
visuals:
- The hard-coded limit of 5000 entries has been
  removed and is now replaced with a variety of
  user-configurable settings to enforce the discarding of
  logger entries.
- Some columns in the logger output can now be hidden.

The filter list look-up feature has been merged into the
existing overlay dialog used to create URL rules or static
filters, as an entry in a new "Details" pane.

Other issues addressed during refactoring:
- https://github.com/uBlockOrigin/uBlock-issues/issues/280
- https://github.com/gorhill/uBlock/issues/1999

The minimum version supported on Firefox has been bumped
up to 55.0.
2019-01-12 16:36:20 -05:00
Raymond Hill
41548be6be
Move early blocking of requests out of experimental status on Firefox
Related issues:
- https://github.com/gorhill/uBlock/issues/2067
- https://github.com/uBlockOrigin/uBlock-issues/issues/128

Related mozbug issue:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1503721
2018-12-23 17:59:31 -05:00
Raymond Hill
e9d76b3575
Report inline script tags in logger if present in document
Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/343
2018-12-21 14:16:17 -05:00
Raymond Hill
2f1d319072
code review: don't remember tabless network requests in behind-the-scene scope 2018-12-14 08:47:29 -05:00
Raymond Hill
1d7e3e8f82
fix https://github.com/uBlockOrigin/uBlock-issues/issues/339 2018-12-14 07:03:19 -05:00
Raymond Hill
9b27a98f90
Fix https://github.com/gorhill/uBlock/issues/3654
Additionally, there has been refactoring work done regarding
filtering context used throughout uBO, motivated by the fix
here.
2018-12-13 12:30:54 -05:00
Raymond Hill
6d9382a501
fix https://github.com/uBlockOrigin/uBlock-issues/issues/77 2018-10-29 09:56:51 -03:00
Raymond Hill
9039874fc9
refactor some webRequest-related code (now that firefox legacy is out of the way) 2018-10-28 10:58:25 -03:00
Raymond Hill
5f3ebafbf2
minor code review 2018-09-21 09:27:41 -04:00
Raymond Hill
e107cbb370
revised fix for https://github.com/uBlockOrigin/uBlock-issues/issues/229 2018-09-21 09:16:46 -04:00
Raymond Hill
6544ff5c56
fix https://github.com/uBlockOrigin/uBlock-issues/issues/229 2018-09-18 17:05:53 -04:00
Raymond Hill
6d34a52179
fix #2859 2018-09-03 14:06:49 -04:00
Raymond Hill
96525cffa5
code review for 3c85c03194: simplify counting of script resources 2018-09-01 06:36:17 -04:00
Raymond Hill
3c85c03194
fix #308, #3436, https://github.com/uBlockOrigin/uBlock-issues/issues/155
<https://github.com/gorhill/uBlock/issues/3436>: a new per-site switch
has been added, no-scripting, which purpose is to wholly disable/enable
javascript for a given site. This new switch has precedence over all
other ways javascript can be disabled, including precedence over dynamic
filtering rules.

The popup panel will report the number of script resources which have
been seen by uBO for the current page. There is a minor inaccuracy to
be fixed regarding the count, and which fix requires to extend request
journaling.

<https://github.com/gorhill/uBlock/issues/308>: the `noscript` tags will
now be respected when the new no-scripting switch is in effect on a given
site.

A default setting has been added to the _Settings_ pane to
disable/enable globally the new no-script switch, such that one can
work in default-deny mode regarding javascript execution.

<https://github.com/uBlockOrigin/uBlock-issues/issues/155>: a new
hidden setting, `requestJournalProcessPeriod`, has been added to
allow controlling the delay before uBO internally process it's
network request journal queue. Default to 1000 (milliseconds).
2018-08-31 18:47:02 -04:00
Raymond Hill
1c8df4a652
fix https://github.com/uBlockOrigin/uBlock-issues/issues/42 2018-05-16 11:50:50 -04:00
Raymond Hill
7e5661383a
code review to further lower overhead of updating toolbar icon 2018-05-08 09:43:25 -04:00
Raymond Hill
427d0fd0ff
fix https://github.com/uBlockOrigin/uBlock-issues/issues/21 2018-04-24 17:12:41 -04:00
Raymond Hill
93f49a61d7
add pre-processor directives to filter list compiler (https://github.com/AdguardTeam/AdguardBrowserExtension/issues/917) 2018-04-05 07:29:15 -04:00
Raymond Hill
bf384e2bca
better evaluate vAPI.webextFlavor 2018-04-04 12:42:01 -04:00
Raymond Hill
e64a59b32c
fix #3667 2018-04-02 18:40:29 -04:00
Raymond Hill
fe11ff61c8
mind whitelist directives for filterable behind-the-scene requests (#3654) 2018-04-02 09:10:38 -04:00
Raymond Hill
0a879a816b
treat behind-the-scene network requests like all others 2018-03-30 08:55:51 -04:00
Raymond Hill
11ccb4523a
update fix for https://github.com/gorhill/uMatrix/issues/967 2018-03-14 12:06:49 -04:00
Raymond Hill
04cee142bc
fix https://github.com/gorhill/uMatrix/issues/967 (uBO-side) 2018-03-13 17:24:07 -04:00
Raymond Hill
8cf87061f4
fix #3562 2018-03-01 14:12:16 -05:00
Raymond Hill
2c901588c7
fix #3546, #3428 2018-02-26 13:59:16 -05:00
Raymond Hill
d42adc912d
fix silly mistake in fix for #3526 2018-02-23 09:45:51 -05:00
Raymond Hill
6b7d8e75f4
bring out of band fixes (c5cbf5db47, 2999dbee5c) for Firefox/webext into master 2018-02-21 08:19:43 -05:00
Raymond Hill
21f7d42f54
fix #3507 2018-02-18 07:16:10 -05:00
Raymond Hill
47152560af
import emergency fix from 1.15.6 2018-02-15 17:39:31 -05:00
Raymond Hill
613ff9cc9b
tentatively fix #3478: need feedback from reporter 2018-02-03 09:34:27 -05:00
Raymond Hill
a0375bb6a3
add support for iso-8859-1/windows-1252 encoding (https://github.com/gorhill/uBlock/issues/3391#issuecomment-354868704) 2018-01-05 13:15:56 -05:00
Raymond Hill
4812ac9b68
fix #3399 (part 1) 2018-01-04 18:26:52 -05:00
Raymond Hill
04d84cf92a
fix #3397 2018-01-03 13:59:38 -05:00
Raymond Hill
455bf281f0
fix #3391 2018-01-02 23:06:16 -05:00
Raymond Hill
f659dc8e49
add TODOs comments 2017-12-30 11:21:23 -05:00
Raymond Hill
6ab34efe44
minor code review: remove pointless test 2017-12-29 21:54:03 -05:00
Raymond Hill
3ec9377c3e
code review: disregard case sensitivity 2017-12-29 21:29:57 -05:00
Raymond Hill
a3f7392f06
code review: mind length of data available 2017-12-29 20:33:24 -05:00
Raymond Hill
b36320c643
code review: improve scriptlet inject code in stream data listener 2017-12-29 20:26:03 -05:00
Raymond Hill
6f8099fb90
fix regression in scriptlet injection: mind BOM sequence in response data filtering 2017-12-29 15:56:15 -05:00
Raymond Hill
a9f68fe02f
Fix #3069, and consequently #3374, #3378.
A new filtering class has been created: "static extended filtering".
This new class is an umbrella class for more specialized filtering
engines:
- Cosmetic filtering
- Scriptlet filtering
- HTML filtering

HTML filtering is available only on platforms which support modifying
the response body on the fly, so only Firefox 57+ at the moment.

With the ability to modify the response body, HTML filtering has
been introduced: removing elements from the DOM before the source
data has been parsed by the browser.

A consequence of HTML filtering ability is to bring back script tag
filtering feature.
2017-12-28 13:49:02 -05:00
gorhill
387eaa0b21
fix #3185 2017-11-16 10:55:28 -05:00
gorhill
b02fcb1b31
fix #3130 2017-11-16 00:34:01 -05:00
gorhill
bc036724c1
code review (#3208) 2017-11-09 15:46:25 -05:00
gorhill
3dcfc302e4
fix https://github.com/gorhill/uBlock/issues/3208#issuecomment-342900031 2017-11-08 13:29:04 -05:00
gorhill
95b25f7d49
fix #3150 2017-10-19 09:35:28 -04:00
gorhill
143e9c7414
more code review re. #3140 2017-10-19 08:07:00 -04:00
gorhill
7e21eec7ce
code review for #3140: handle case where both blockedURI & sourceFile are not found 2017-10-19 00:45:24 -04:00
gorhill
eb7bdba47f
fix #3140 2017-10-18 15:00:22 -04:00
gorhill
dfe18111b9
fix #1539 2017-09-11 09:53:42 -04:00
gorhill
eb3519b075
fix #2839 2017-08-03 10:18:05 -04:00
gorhill
b429e1c7ba
fix #2813 2017-07-22 16:58:08 -04:00
gorhill
1581ec20d8
fix #2659 (regression) 2017-05-28 16:57:02 -04:00
gorhill
c1589cafaa
fix popup panel layout as per feedback: 39aeaa12a7 (commitcomment-22310294) 2017-05-28 13:32:08 -04:00
gorhill
d50e76745d
fix #2658 2017-05-28 12:21:56 -04:00
gorhill
95f29c98fd
fix #2658 2017-05-28 10:53:13 -04:00
gorhill
853f012802
fix #2631: regression introduced in 0232382695 2017-05-19 20:21:28 -04:00
gorhill
fcf43d972e
tentatively fix issue reported in #2612 re. FFox 24.8.1 2017-05-19 10:12:55 -04:00
gorhill
0464075dfc
code review: fix "logger enabled" code paths re. csp injection 2017-05-17 09:25:11 -04:00
gorhill
0232382695
refactor static network filtering, add support for csp injection 2017-05-12 10:35:11 -04:00
gorhill
e50a05a8d0
minor code review 2017-04-26 12:50:05 -04:00
gorhill
3ce3ed2a0e
code review: simplify CSP injection code 2017-04-24 19:11:13 -04:00
gorhill
d7f751d42b
fix #2440 2017-03-16 19:14:25 -04:00
gorhill
7e55ddf16b re. websocket: mind backward compatibility 2017-03-06 17:53:25 -05:00
gorhill
2213b005a0 forgot to add "ws://*/*"/"wss://*/*" to enable support for websocket type" 2017-03-06 17:34:46 -05:00
gorhill
4d1ed37556 Firefox WebExt readiness (#622) + support more webRequest types when available (websocket, font, csp_report) 2017-03-05 08:25:55 -05:00
gorhill
7176ecb3e7 code review of fix to #2360 2017-02-07 08:05:39 -05:00
gorhill
a742f09dd4 fix #2360 2017-02-06 15:34:31 -05:00
gorhill
d79a781bea report blanket websocket blocking once only 2017-01-25 09:21:16 -05:00
gorhill
54032e520b fix https://github.com/gorhill/uBO-Extra/issues/19 2017-01-17 18:18:28 -05:00
gorhill
d913eea1f6 fix #2132 + various minor code review 2016-11-08 15:53:08 -05:00
gorhill
c6793eff98 code review re. #2067 2016-11-03 23:42:03 -04:00
gorhill
8c3da95d65 fix #2067 (experimental) + support for hidden settings 2016-11-03 11:20:47 -04:00
gorhill
70ab1a26de code review re. #1884, as per feedback at https://bugs.chromium.org/p/chromium/issues/detail?id=637577#c15 2016-10-17 09:37:59 -04:00
gorhill
cbefeb923c fix #1884 2016-10-14 10:06:34 -04:00
gorhill
3ff3ae7d70 fix #2053 2016-10-08 10:15:31 -04:00
gorhill
751e34f3ce fix #2050 2016-10-05 18:18:32 -04:00
gorhill
d4ce29397a code review re. 60f60c2c97 2016-08-31 05:19:16 -04:00
gorhill
35b46cab4c code review re. 60f60c2c97 2016-08-30 22:45:24 -04:00
gorhill
60f60c2c97 fix spurious strict blocking when other is used (https://github.com/uBlockOrigin/uAssets/issues/123#issuecomment-243602934) 2016-08-30 19:55:41 -04:00
gorhill
0db340450e code review re. #1943 2016-08-29 08:10:18 -04:00
gorhill
bbc00ebb81 fix #1943 2016-08-29 07:55:13 -04:00
gorhill
3a459bbc5e fix https://github.com/gorhill/uBlock/issues/1936#issuecomment-242964554 2016-08-28 06:40:41 -04:00
gorhill
8586aee848 fix #1936: ability to foil WebSocket using a CSP directive 2016-08-27 11:08:56 -04:00
gorhill
46a87a649b fix #1909 2016-08-18 11:54:38 -04:00
gorhill
2725479709 better fix for https://bugzilla.mozilla.org/show_bug.cgi?id=1232354, as pointed out in comments 2016-08-15 22:50:24 -04:00
gorhill
8374799c7d various minor code review 2016-06-30 22:03:29 -04:00
gorhill
95d0ffafb7 this fixes #870 2016-03-22 10:19:41 -04:00
gorhill
f044854068 this fixes #1359 2016-02-09 18:53:36 -05:00
gorhill
1f345b585f this should fix #1276 2016-01-22 11:13:29 -05:00