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

Also check wildcard domains for validity before adding #2212

Merged
merged 2 commits into from Jun 12, 2022
Merged

Conversation

yubiuser
Copy link
Member

  • I have read and understood the contributors guide, as well as this entire template.
  • I have made only one major change in my proposed changes.
  • I have commented my proposed changes within the code.
  • I have tested my proposed changes.
  • I am willing to help maintain this change if there are issues with it later.
  • I give this submission freely and claim no ownership.
  • It is compatible with the EUPL 1.2 license
  • I have squashed any insignificant commits. (git rebase)
  • I have Signed Off all commits. (git commit --signoff)

What does this PR aim to accomplish?:

So far, we do not check the domain for validity if the wildcard checkbox is selected. This made it possible to enter anything into the input box without being checked.

How does this PR accomplish the above?:

Check input for validity always (except it is a regex, meaning type 2 or 3), and do the wildcard conversion after the check has been performed.

Types according to
https://github.com/pi-hole/AdminLTE/blob/6c320a42574f9f0944ded71d84b7331557dbc6ea/scripts/pi-hole/js/groups-domains.js#L342-L354

What documentation changes (if any) are needed to support this PR?:

None

Signed-off-by: Christian König <ckoenig@posteo.de>
@yubiuser yubiuser requested a review from a team May 26, 2022 21:41
@yubiuser yubiuser added the PR: Approval Required Open Pull Request, needs approval label May 30, 2022
@yubiuser yubiuser requested a review from rdwebdesign June 4, 2022 18:29
Copy link
Member

@PromoFaux PromoFaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works, though would prefer the boolean logic to be as suggested (also happy for anyone to overrule this review!)

Co-authored-by: Adam Warner <me@adamwarner.co.uk>

Signed-off-by: yubiuser <ckoenig@posteo.de>
@yubiuser yubiuser requested a review from PromoFaux June 12, 2022 11:25
@PromoFaux PromoFaux merged commit 920dc5b into devel Jun 12, 2022
@PromoFaux PromoFaux deleted the valid_wildtype branch June 12, 2022 12:28
@pralor-bot
Copy link

This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pi-hole-ftl-v5-16-web-v5-13-and-core-v5-11-1-released/56384/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Approval Required Open Pull Request, needs approval
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants