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

Properly parse r.RemoteAddr #50

Merged
merged 3 commits into from
Mar 14, 2018
Merged

Properly parse r.RemoteAddr #50

merged 3 commits into from
Mar 14, 2018

Conversation

joohoi
Copy link
Owner

@joohoi joohoi commented Mar 14, 2018

RemoteAddr in http.Request is in form of HOST:PORT, so the value needed to be split before comparing to the CIDR masks in validation code.

Fixes: #45

@coveralls
Copy link

coveralls commented Mar 14, 2018

Coverage Status

Coverage increased (+0.3%) to 92.244% when pulling 000f782 on fix_remoteaddr into 5c2e60a on master.

@joohoi
Copy link
Owner Author

joohoi commented Mar 14, 2018

Added tests and fixed net.ParseCIDR issues with IPv6 addresses enclosed in brackets.

@joohoi joohoi merged commit 439da9c into master Mar 14, 2018
@joohoi joohoi deleted the fix_remoteaddr branch March 20, 2018 13:03
jacobmyers-codeninja pushed a commit to jacobmyers-codeninja/acme-dns that referenced this pull request Sep 30, 2020
* Properly parse r.RemoteAddr

* Add tests, and fix net.ParseCIDR issues with IPv6 addresses enclosed in brackets
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

Successfully merging this pull request may close these issues.

None yet

3 participants