pi-hole / FTL

The Pi-hole FTL engine
https://pi-hole.net
Other
1.34k stars 187 forks source link

Fix incorrect unification of regex warnings #1989

Closed DL6ER closed 4 weeks ago

DL6ER commented 4 weeks ago

What does this implement/fix?

Current development-v6 singles out regex warnings by the warning itself rather than the regex itself. This leads to the defect that multiple warnings get incorrectly summarized together when they are affected by the same warning.

How to reproduce:

Add domains via the sqlite3 CLI to the gravity.db database, e.g.

INSERT INTO domainlist (type,domain) VALUES (3,'[[[');
INSERT INTO domainlist (type,domain) VALUES (3,'[[[[');
INSERT INTO domainlist (type,domain) VALUES (3,'[[[[[');
INSERT INTO domainlist (type,domain) VALUES (3,'[[[[[[');

On development-v6: Only one entry is created in the diagnosis system On this branch: All warnings are shown, e.g., image

We don't need to update anything in any other repo as FTL is now the only responsible player in generating messages.


Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

DL6ER commented 4 weeks ago

The last commit fixes another issue which could have happened when multiple warnings are triggered for database table adjacent entries were issued - cfm. the last three warnings in the screenshot above had the same ID shown.