AdguardTeam / AdguardTeam/AdguardForWindows

Allow to trust built-in third-party filters

Aberta
#4,386 3 comentários 0 reações 1 responsável Atribuída a @kpokas-adguard Ver no GitHub
Enhancement Feature request Priority: P4
Linguagem predominante
Sem dados de linguagem
Estrelas
887
Forks
84
Merge médio
27min
PRs com merge (30d)
2

Descrição

## Intro

Hi. :wave: Let's take a concrete example. For reasons I'll explain in the _Context_ section — sorry in advance for the length —, I wanted to switch from the built-in third-party `Fanboy's Annoyances` filter (with its [trustLevel set to "low"](https://github.com/AdguardTeam/FiltersRegistry/blob/4437cab56655c2039b88c559a38830244211c1fd/filters/ThirdParty/filter_122_FanboysAnnoyances/metadata.json#L15)) to the original `Fanboy's Annoyance List` (not having this limitation). Impossible unfortunately without a workaround (i.e. to use another URL) in `AdGuard for Windows` — unlike in `AdGuard Browser extension`.

## Proposed solutions

- :a: Either allow to check `Trusted filter` for built-in third-party filters …
_Possibly when it's added from the built-in list (in the add wizard) and/or … at least leave this possibility later (instead of [this](https://user-images.githubusercontent.com/4764956/185604734-d6cc6a08-ea57-4f8c-b7d0-9d1646a29ac6.png), have [that](https://user-images.githubusercontent.com/4764956/185604742-38b0d12e-12a3-48b0-8380-a9d4d59f8d69.png))._

    View the implications …

- The reported issues by the users should automatically mention this state for these filters.

- The AdGuard Filters team will need to ensure that they use these same conditions for their reproducibility tests.

- :bulb: If AdGuard does not want to take the risk of hosting third-party filter versions with risky rules inside, simply use the original source when the user checks "trusted filter" on an otherwise "low" one (AdGuard knows how to handle `+js` rules and stuff like that anyway).

- :b: And/Or, at the very least I want to say, if a person removes the built-in third-party `Fanboy's Annoyances` filter and adds manually the original one via its official address (`https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt`) **and** checks `Trusted filter`, do not redirect/hijack the URL towards the built-in limited version — as it seems to be now — nor convert it to this limited version format at this time either _(especially without notifying the user of this, I would add :relaxed:)_. `AdGuard Browser extension` does not suffer from this problem it seems.

## :mag: About this hijack

#### :heavy_multiplication_x: `AdGuard for Windows` current problematic state:

View it …

- **Initial state** — Built-in third-party `Fanboy's Annoyances` filter added:
[screenshot](https://user-images.githubusercontent.com/4764956/185612901-727bb247-c97b-43e3-a91c-aaa99670aa21.png)
:arrow_right_hook: Observe: 57551 rules.

- When removing it then adding manually a new filter with its official URL (which is: `https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt`):
[screenshot](https://user-images.githubusercontent.com/4764956/185613173-c1d872a8-9bc4-48e2-b9c4-591f49277609.png)
:arrow_right_hook: Observe: the name is not `Fanboy's Annoyance List` but has become `Fanboy's Annoyances` with `v0.0.0.0`. **#hijack**

- Once added:
[screenshot](https://user-images.githubusercontent.com/4764956/185613478-6472335e-effa-4dfc-ba74-b6260104be35.png)
:arrow_right_hook: Observe: 57551 rules _only_, name of the AG version and auto put in "Annoyances" section.

- NOW, when adding manually a new filter with _another_ URL to the same location **as a workaround** (using the following URL instead: `https://www.fanboy.co.nz/fanboy-annoyance_ubo.txt`):
[screenshot](https://user-images.githubusercontent.com/4764956/185613877-8ba65101-63db-4879-8586-9ee5d3289f13.png)
:arrow_right_hook: Observe: the name **is** correctly `Fanboy's Annoyance List` with the current version of the moment.

- Once added:
[screenshot](https://user-images.githubusercontent.com/4764956/185613918-e3d0cdcb-864a-4b2d-b4d0-cafe7ec779b0.png)
:arrow_right_hook: Observe: **59016** rules _as expected_, original name kept and put in the top section ("User" section).
 

#### :heavy_check_mark: `AdGuard Browser extension` current okay state:

View it …

- Adding manually a new filter with its official URL (which is: `https://secure.fanboy.co.nz/fanboy-annoyance_ubo.txt`):
[screenshot](https://user-images.githubusercontent.com/4764956/185619346-436b3cca-1d41-4f58-8987-fb23542f2f99.png)
:arrow_right_hook: Observe: **59015** rules _as expected_`*`, original name kept. NOT hijacked in this case unlike `AdGuard for Windows`.
 
_`*` (So, all the 59000+ rules. No need to worry about the 1 rule of difference versus `AdGuard for Windows` here, the `sha256sum` returned value for this file both accessed via "www." and "secure." is always identical for information.)_

- Once added:
[screenshot](https://user-images.githubusercontent.com/4764956/185619640-f776cece-5f01-4ff5-8684-27d4a77d6234.png)
:arrow_right_hook: Observe: original name kept, correct version of the moment. Tested and … additional rules are correctly present. :heavy_check_mark:

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.