AdguardTeam / FiltersCompiler

A tool that compiles & validates filters
GNU Lesser General Public License v3.0
52 stars 12 forks source link

Allow using `$permissions` rules without URL part #229

Open Alex-302 opened 2 months ago

Alex-302 commented 2 months ago

$permissions=join-ad-interest-group=() can work without URL, and /*/ is redundant (like $removeparam=s_cid).

Related to https://github.com/AdguardTeam/FiltersRegistry/blob/e529458be21800609358ce99ff1bcc8bb5b02305/filters/filter_3_Spyware/diff.txt:

! Error: "The rule is too wide, add domain restriction or make the pattern more specific" in the rule: "*.*$permissions=join-ad-interest-group=()\, run-ad-auction=()\, browsing-topics=()"
*.*$permissions=join-ad-interest-group=()\, run-ad-auction=()\, browsing-topics=()

TODO: remove /*/ in https://github.com/AdguardTeam/AdguardFilters/pull/188049/files after update.