DandelionSprout / adfilt

The place where I, DandelionSprout, store my web filter lists for countless topics, including my Nordic adblock list. As simple as that, really.
Other
1.53k stars 151 forks source link

Lists contain bad entries such as `!#if` #997

Closed ThinkChaos closed 10 months ago

ThinkChaos commented 10 months ago

Describe the problem below this line as meticulously and detailed as possible (incl. pagelinks if any)

Hi,

I noticed some lists contains lines like !#if. I'm guessing you use those for pre-processing.
Anyways they're not valid for hosts, domains, and most likely other formats.

A couple random examples:

Add screenshots below if needed

No response

Add a screenshot of the extension's logger

No response

Which adblocker(s) did you use when testing this?

(Other)

Adblocker version(s)

No response

Which filterlists did you use? Failing to tell this will temporarily close the report until it has been told.

AntiMalwareHosts.txt

Which browser(s) did you use when testing this?

(Other)

Browser version(s)

No response

Which OS(s) did you use when testing this?

No response

OS version(s)

No response

iam-py-test commented 10 months ago

Anyways they're not valid for hosts, domains, and most likely other formats.

!#if is valid syntax in uBlock Origin and AdGuard, and is treated as a comment in AdBlock/ABP. PiHole should treat them as comments, though it may not, as it handles "adblock" syntax filterlists different from every other mainstream content blocker. That said, they are not valid in HOSTs/domains style files. Thanks

DandelionSprout commented 10 months ago

I've been on a run lately, where I've tried to ensure that most of my lists (except those that are included as opt-out or opt-in in adblockers, before anyone asks) would be forcibly non-working in uBO Minus or AdGuard MV3; and uBO have traditionally been able to handle both Hosts and raw domain files very easily.

So I admit I'm unsure how to handle this.

DandelionSprout commented 10 months ago

Okay, so it turns out that there's several dozen similar !#if tags in the first of those files, making me wonder how on earth I even managed to do such a mistake in my conversion scripts in the first place.

This gives me a faint clue on how to fix this, but the implementation of that fix(es) won't be a stroll in the park, sadly.

ThinkChaos commented 10 months ago

I've been on a run lately, where I've tried to ensure that most of my lists (except those that are included as opt-out or opt-in in adblockers, before anyone asks) would be forcibly non-working in uBO Minus or AdGuard MV3; and uBO have traditionally been able to handle both Hosts and raw domain files very easily.

FWIW I'm using the list with blocky, and we've intentionally avoided implementing adblocking list directives since they're mostly irrelevant/unusable for DNS blockers.

I appreciate the goal of breaking extensions from bad actors, but I think having working hosts/domains is more important. Anyways I'd guess those extensions are less likely to use these list formats.

ThinkChaos commented 10 months ago

Thanks!