Skip to content

Do not accept comma to separate regex #2835

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

Merged
merged 3 commits into from
Nov 16, 2023
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Nov 15, 2023

What does this implement/fix?

Domains/Regex must be either space or newline separated when adding multiple at once. It is not possible to use comma as this has a special meaning in the regex world

Can be tested by adding

google{1,2}

Before:
Screenshot from 2023-11-15 12-04-50

Now:
Screenshot from 2023-11-15 12-11-32

It is advisable to use FTL from PR pi-hole/FTL#1759 to prevent FTL from crashing during the review test.

Fixes #2834


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:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

@DL6ER DL6ER requested a review from a team November 15, 2023 11:10
…ultiple at once. It is not possible to use comma as this has a special meaning in the regex world

Signed-off-by: DL6ER <dl6er@dl6er.de>
@yubiuser
Copy link
Member

Should we also remove the ability to split adlists, groups,clients by comma just to make it more consistent (and to match the hint which only says "space-seperated")?

@DL6ER
Copy link
Member Author

DL6ER commented Nov 15, 2023

I was thinking about this but thought that it may actually be good to be somewhat more generous concerning separators where they don't cause trouble. My feeling is that users will simply try this without actually reading anything

rdwebdesign
rdwebdesign previously approved these changes Nov 15, 2023
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: Christian König <ckoenig@posteo.de>
@yubiuser yubiuser linked an issue Nov 16, 2023 that may be closed by this pull request
@DL6ER DL6ER merged commit 8b7c88f into development-v6 Nov 16, 2023
@DL6ER DL6ER deleted the fix/no_split_comma branch November 16, 2023 21:26
@PromoFaux PromoFaux mentioned this pull request Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot add regex containing comma in v6
3 participants