[DEV] bad handling of capitalization of domain names

@DL6ER
I did an update today.
Now the blacklist and whitelist are empty in the web interface and new domains cannot be added anymore.
But pihole -b -l in the CLI still shows existing entries.

I personally don't think it's a good idea to allow the exact same rule(s) on both lists by default. It would unnecessarily confuse the user.
Especially if the same domain is on the blacklist, the blocklist and on the whitelist. Then the user would have to have a lot of knowledge about the way it works.
Usually, the user disables Pi-hole blocking for short time or bypasses it completely to visit a blocked site, if really needed, and nothing needs to be added or removed on the lists.

If you want a button at each domain's line to move the entry to the opposite list or if you want to get a popup message about how many of the added domains has beed moved from the opposite list while adding, you should open a new thread or Feature Request, I think.

Mind that an exact domain and the regex to block this domain will never be the same.

Example:

  • Exact domain: www.domain.com
  • Regex filter to catch this: www\.domain\.com (note the \.)
    These two are not identical and can still be added at the same time. Even if this may make no sense.

I agree. Why should it be possible to allow the exact same domain on the black- and whitelist?

Don't get me wrong, I can see why it can be beneficial to have a blacklisted domain and a white regex filter for the very same: If you want to whitelist a specific domain but block all their subdomains.

But this will still be possible:

Exact white: domain.com
Black regex: domain\.com$

These two are obviously different and, hence, are still possible.

@anon55913113 Please provide a specific example for something that would not be possible any more. This would be very helpful in this discussion as we're all looking from very different angles at the same issue, it seems.

Regex and exact domains will be stored in the same table...

I still disagree. Because we add enabled/disabled at the same time. Just go to your blacklist and disable to domain for a small time. Alternatively, you can also configure the clients of your choice to never see this domain with Pi-hole v5.0. So block it for some, but not the others.

Do you mean the wrong wording from CLI output addressed in Post 8 by @PromoFaux ?
This is already fixed in the current development branch.

@DL6ER
Using the Web Interface it is still possible to add domains to the White/Blacklist with capital letters.

Thanks for pointing this out. I will make sure to fix this.
In the future, we might even replace the "traditional" white-/blacklist pages by the new domain management developed in

Exemplary screenshot:


edit: For the current list pages:

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.