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
Add validation for banned IPs #4379
base: feature
Are you sure you want to change the base?
Conversation
d3a5adb
to
f2b19e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, although I've picked a few minor issues, this looks like a nice addition - thanks for your contribution! Just a warning: it may not be merged prior to the (imminent) release of 1.8.27, in which case its merge will have to wait until the 1.9 rebase is completed.
f2b19e9
to
8fd5a03
Compare
Even though that would be even more user-friendly, I'll guess that that will result in a pretty clunky and difficult to maintain RegEx, especially with support for |
Yep, that was my initial reaction, although, having said that, we do already have this[1] regex, which I think might fairly be described as "clunky and difficult to maintain", even given @dvz's admirable refactoring of it from its previous[2], even clunkier and harder to maintain state as two separately clunky regexes. So... But yes, the regex under consideration might be a lot worse. [1] Lines 1648 to 1662 in aa76916
[2] Lines 1524 to 1525 in ee2c6a3
|
By the way, @n-thumann, although I'm not an expert on Git etiquette, my understanding is that it's in general not a good idea to force-push changes to public repositories (including when they are the source of pull requests); better is to add the changes in a new commit. I hope that this comment doesn't come across as overly rude. |
Don't worry, it didn't :) I am used to fixup additional commits for a PR to keep the history clean, so that's always ready to merge without additional squashing needed by the maintainers, but I'll keep that in mind for future commits here. |
Resolves #4378
This resolved the issue above by performing a check on entered IP addresses or subnets.
If the entered IP address is invalid, a error will be shown (that's the reason I've renamed one existing language string).