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

Fix/remote addr #232

Merged
merged 3 commits into from Jan 26, 2019
Merged

Fix/remote addr #232

merged 3 commits into from Jan 26, 2019

Conversation

@bertjwregeer
Copy link
Member

@bertjwregeer bertjwregeer commented Jan 26, 2019

REMOTE_ADDR is inherited from the CGI spec, and it specifies that IP addresses should be placed in REMOTE_ADDR, and while IPv6 formatting allows for using brackets around the IP address, it is only generally done when you are also including the port number.

The port number is in REMOTE_PORT (if it exists) and thus the formatting with a bracket is not correct.

Closes #230

# Make sure that all IPv6 addresses are surrounded by brackets
# Make sure that all IPv6 addresses are surrounded by brackets,
# this is assuming that the IPv6 representation here does not
# include a port number.
Copy link
Member Author

@bertjwregeer bertjwregeer Jan 26, 2019

https://tools.ietf.org/html/rfc5952#page-11 is a beast, and I am certainly not going to attempt to support every format out there.

@bertjwregeer bertjwregeer merged commit dd6be68 into master Jan 26, 2019
4 checks passed
@bertjwregeer bertjwregeer deleted the fix/remote_addr branch Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant