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

Improve the address validator #340

Open
lni opened this issue Dec 22, 2023 · 1 comment
Open

Improve the address validator #340

lni opened this issue Dec 22, 2023 · 1 comment

Comments

@lni
Copy link
Owner

lni commented Dec 22, 2023

All addresses used in the config are locally validated, the current implementation relies on a few regex to do that, code is here. See IsValidAddress() and IsValidAddressErr().

Current limitation is that it can't tell that things like 192.168.0.300 is invalid (see the 300 part), as they are considered as a valid hostname (not an IPv4 address).

It will great if someone can help to improve the address validator and provide a few tests.

@nurlantulemisov
Copy link

hi @lni.

I would like to get feedback from you about PR.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants