Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for domain.* TLD matching #48

Closed
ameshkov opened this issue Jul 17, 2017 · 6 comments
Closed

Add support for domain.* TLD matching #48

ameshkov opened this issue Jul 17, 2017 · 6 comments

Comments

@ameshkov
Copy link
Member

ameshkov commented Jul 17, 2017

google.*##example.org should match all the google.TLD domains.

After that, add a task to AdguardKnowledgeBase -- this should be described there.

@sxgunchenko
Copy link

sxgunchenko commented Sep 18, 2019

core/pull-requests/1489
core/pull-requests/1510

@ameshkov ameshkov changed the title Add support for domain.* TLD matching to cosmetic rules Add support for domain.* TLD matching Sep 18, 2019
@sxgunchenko
Copy link

Testing instructions:

  1. add the following rule: google.*#%#alert('alert');
  2. check that alert is displayed on both google.com and google.ru

@TPS
Copy link

TPS commented Nov 19, 2022

N.B.: I hate to necropost, but this seems to be the closest issue I can post this to w/o adding bunch of background info.

Are y'all sure of this syntax? It seems like google.evildomain.whatever would slip through, too, &/or any TLD not on Google's official list @ httpS://www.google.com/supported_domains (especially w/ the recent explosion of allowable TLDs, e.g., httpS://data.iana.org/TLD/tlds-alpha-by-domain.txt via httpS://www.icann.org/resources/pages/tlds-2012-02-25-en).

It seems like having explicit TLD/subdomain matchers (similar to $domain @ httpS://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#basic-modifiers) would be more secure.

@ameshkov
Copy link
Member Author

@TPS Note, that TLD only means any domain from the public suffix list: https://publicsuffix.org/.

@TPS
Copy link

TPS commented Nov 19, 2022

The PSL seems to be an honorable resource, but comments like publicsuffix/list#1563 (comment) don't inspire confidence. Also,

  • e.g., in the case of Google, when an official list is provided, it might be higher worth than the PSL.
  • ICANN's might be somewhere in between
  • Is the process y'all use for https://github.com/AdguardTeam/companiesdb better?

Overall, this seems to be a similar problem to AdguardTeam/HttpsExclusions#24

@ameshkov
Copy link
Member Author

PSL is not just a honorable resource, it is used by all browsers to detect domains that cannot have cookies.

Anyways, I actually seem to be wrong here and we actually use ICANN at least in the browser extension.

e.g., in the case of Google, when an official list is provided, it might be higher worth than the PSL.

The rule syntax cannot be linked to a particular company. The current definition is that when the domain is written as example.*, .* means any ICANN-registered TLD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment