Skip to content

Clarify number and position of wildcard labels #145

@weppos

Description

@weppos

I made a commit a few weeks ago that introduced a rule like *.*.private.domain and the commit caused the build to fail.

According to our website, that is supposed to be a valid format:

Wildcards are not restricted to appear only in the leftmost position, but they must wildcard an entire label. (I.e. ..foo is a valid rule: *bar.foo is not.)

@rockdaboot mentioned a potential incompatibility of Chromium if we allow multiple wildcards. libpsl is currently not compatible with multiple wildcards, and to be fair I haven't tested my Ruby implementation either.

@gerv @sleevi can we clarify whether multiple wildcard labels are accepted? Specifically, we should be more clear if the following rules are valid:

// multiple leading wildcards (common case)
*.*.foo.bar

// single wildcard, but inside the rule
foo.*.bar

// multiple willdcards, inside the rule
foo.*.*.bar

// multiple willdcards, inside the rule, non consecutive
foo.*.bar.*.baz

// I suppose this is invalid
foo.*

The current list definition doesn't explicitly deny these rules, they are supposed to be valid.

Once the decision is taken, I think we should:

  1. Update the website to make it more clear
  2. Add some corresponding tests in the test file
  3. Should the rules be considered invalid, I'll also add the corresponding rules to the linter I'm working on,
  4. Should the rules be considered valid, we should ping the various lib maintainers

Metadata

Metadata

Assignees

Labels

r=dnsguruMarked as approved and ready to merge by @dnsguru

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions