uBlock/src/js
Raymond Hill 64c1f8767c
Add ability to control trusted status of filter lists
Related discussion:
https://github.com/uBlockOrigin/uBlock-issues/discussions/2895

Changes:

The _content of the My filters_ pane is now considered untrusted by
default, and only uBO's own lists are now trusted by default.

It has been observed that too many people will readily copy-paste
filters from random sources. Copy-pasting filters which require trust
represents a security risk to users with no understanding of how the
filters work and their potential abuse.

Using a filter which requires trust in a filter list from an untrusted
source will cause the filter to be invalid, i.e. shown as an error.

A new advanced setting has been added to control which lists are
considered trustworthy: `trustedListPrefixes`, which is a space-
separated list of tokens. Examples of possible values:

- `ublock-`: trust only uBO lists, exclude everything else including
  content of _My filters_ (default value)

- `ublock- user-`: trust uBO lists and content of _My filters_

- `-`: trust no list, essentially disabling all filters requiring
  trust (admins or people who don't trust us may want to use this)

One can also decide to trust lists maintained elsewhere. For example,
for stock AdGuard lists add ` adguard-`. To trust stock EasyList lists,
add ` easylist-`.

To trust a specific regional stock list, look-up its token in
assets.json and add to `trustedListPrefixes`.

The matching is made with String.startsWith(), hence why `ublock-`
matches all uBO's own filter lists.

This also allows to trust imported lists, for example add
` https://filters.adtidy.org/extension/ublock/filters/` to trust all
non-stock AdGuard lists.

Add the complete URL of a given imported list to trust only that one
list.

URLs not starting with `https://` or `file:///` will be rejected,
i.e. `http://example.org` will be ignored.

Invalid URLs are rejected.
2023-10-21 19:29:10 -04:00
..
codemirror Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
scriptlets Fix comment 2023-10-15 11:06:40 -04:00
wasm use WebAssembly-1.0 compliant function names 2022-05-22 17:34:12 +02:00
1p-filters.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
3p-filters.js Add ability to update lists through links with specifically crafted URLs 2023-10-14 13:41:49 -04:00
about.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
advanced-settings.js Wrap usage of setTimeout in helper for background + auxiliary pages 2023-04-09 13:38:16 -04:00
asset-viewer.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
assets.js Fix comment 2023-10-18 08:55:09 -04:00
background.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
base64-custom.js Modularize codebase with export/import 2021-07-27 17:26:04 -04:00
benchmarks.js Add new static network filter option: urltransform 2023-10-16 09:47:29 -04:00
biditrie.js Add experimental mv3 version 2022-09-06 13:47:52 -04:00
cachestorage.js Use browser.storage.local API for Firefox + private mode 2023-07-06 19:58:05 -04:00
click2load.js Fix CSS sizing of click-to-load widget as suggested 2022-01-07 08:02:31 -05:00
cloud-ui.js Fix cloud storage widget not showing (regression) 2023-04-10 10:03:51 -04:00
code-viewer.js Fix looking up clickable URLs in code viewer 2023-07-29 10:51:15 -04:00
commands.js Wrap usage of setTimeout in helper for background + auxiliary pages 2023-04-09 13:38:16 -04:00
console.js Further modularize uBO's codebase 2021-07-28 19:48:38 -04:00
contentscript-extra.js [mv3] Use workaround to inject scriptlets in Firefox 2023-08-11 13:22:25 -04:00
contentscript.js Fix typos 2023-07-23 10:01:08 -04:00
contextmenu.js Fix "View source..." context menu entry in Firefox 2023-03-12 10:21:30 -04:00
cosmetic-filtering.js Fix dumping of CFE internals when no cosmetic filters present 2023-10-09 11:12:10 -04:00
dashboard-common.js Wrap usage of setTimeout in helper for background + auxiliary pages 2023-04-09 13:38:16 -04:00
dashboard.js Add ability to update lists through links with specifically crafted URLs 2023-10-14 13:41:49 -04:00
devtools.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
document-blocked.js Patch Unicode country flags with image-based flags 2023-05-20 21:35:52 -04:00
dom.js Add support for sublists in "Filter lists" pane 2023-05-06 12:50:25 -04:00
dyna-rules.js Code maintenance: replace uDom.js with dom.js 2022-11-12 09:51:22 -05:00
dynamic-net-filtering.js Make object equivalent of frame for dynamic filtering purpose 2023-03-31 09:37:53 -04:00
epicker-ui.js Use Unicode version of hostnames in element picker 2023-08-20 11:27:19 -04:00
fa-icons.js Fix cloud storage widget not showing (regression) 2023-04-10 10:03:51 -04:00
filtering-context.js Fix typos 2023-07-23 10:01:08 -04:00
filtering-engines.js Export the rule-based filtering engines to the nodejs package 2021-08-03 12:19:25 -04:00
hnswitches.js Convert punycode.js into an ES module (#3845) 2021-08-22 12:03:59 -04:00
hntrie.js Fix not properly resetting needle buffer in createTrieFromStoredDomainOpt() 2021-12-25 07:51:12 -05:00
html-filtering.js Add support for negated hostnames in HTML filters 2023-03-28 08:35:09 -04:00
httpheader-filtering.js Fix broken http header filtering 2023-03-21 10:22:32 -04:00
i18n.js Prefix lists with ccTLDs instead of 3-letter country codes 2023-05-21 21:08:29 -04:00
logger-ui-inspector.js Wrap usage of setTimeout in helper for background + auxiliary pages 2023-04-09 13:38:16 -04:00
logger-ui.js Do not issue extraneous doc separators in logger 2023-08-17 09:28:29 -04:00
logger.js Wrap usage of setTimeout in helper for background + auxiliary pages 2023-04-09 13:38:16 -04:00
lz4.js Simplify lz4 instance management 2023-04-25 22:14:15 -04:00
messaging.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
pagestore.js Add new static network filter option: urltransform 2023-10-16 09:47:29 -04:00
popup-fenix.js Use non-normalized URL for reload/report operations 2023-08-10 12:10:19 -04:00
redirect-engine.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
redirect-resources.js Remove obsolete entry 2023-07-18 09:42:28 -04:00
reverselookup-worker.js Add compatibility with AdGuard's #%#//scriptlet(...) syntax 2023-06-28 19:35:22 -04:00
reverselookup.js Add new static network filter option: urltransform 2023-10-16 09:47:29 -04:00
scriptlet-filtering.js Ensure scriptlet cache is reset when filtering profile changes 2023-10-21 14:25:26 -04:00
settings.js Support restoring from application/json file 2023-10-10 10:16:55 -04:00
start.js Ensure scriptlet cache is reset when filtering profile changes 2023-10-21 14:25:26 -04:00
static-dnr-filtering.js Add new static network filter option: urltransform 2023-10-16 09:47:29 -04:00
static-ext-filtering-db.js Add compatibility with AdGuard's #%#//scriptlet(...) syntax 2023-06-28 19:35:22 -04:00
static-ext-filtering.js Add compatibility with AdGuard's #%#//scriptlet(...) syntax 2023-06-28 19:35:22 -04:00
static-filtering-io.js Add support for negated hostnames in HTML filters 2023-03-28 08:35:09 -04:00
static-filtering-parser.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
static-net-filtering.js Prevent redirecting when URL is not transformed 2023-10-16 11:14:12 -04:00
storage.js Add ability to control trusted status of filter lists 2023-10-21 19:29:10 -04:00
support.js Support pane: mark lists as obsolete only when update button is clicked 2023-10-16 07:33:38 -04:00
tab.js Wrap usage of setTimeout in helper for background + auxiliary pages 2023-04-09 13:38:16 -04:00
tasks.js Refactoring work in static network filtering engine 2021-12-04 11:16:44 -05:00
text-encode.js Further modularize uBO's codebase 2021-07-28 19:48:38 -04:00
text-utils.js Move orphanizeString() into text-utils module 2021-07-31 08:38:33 -04:00
theme.js Fix race condition when looking up current auto/light/dark theme 2023-03-12 11:20:54 -04:00
traffic.js Support pairing doc with urltransform 2023-10-18 09:06:28 -04:00
ublock.js Ensure scriptlet cache is reset when filtering profile changes 2023-10-21 14:25:26 -04:00
uri-utils.js Simplify often-executed regex 2021-12-10 07:47:21 -05:00
url-net-filtering.js Fix improperly detecting ruleset changes re. dynamic URL filtering 2022-10-19 12:12:09 -04:00
utils.js Ensure scriptlet cache is reset when filtering profile changes 2023-10-21 14:25:26 -04:00
whitelist.js Fix wrong syntax color highlight in "Trusted sites" pane 2023-03-02 20:50:32 -05:00