-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix issue #5371 to correctly handle Request IP Addresses #5372
Conversation
…n hosted behind an ARR
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.
Hmm, not sure if it's an issue or not but what about IPv6 addresses that use : as a separator ?
That's a great point @valadas. I think we need to try calling |
…st return the IP without the port
Finnally brought back the port removal outside the ValidateIP method since it must return the IP without the port (returning the IP with the port is not for what the method is currently used) |
That looks better, it only leaves the possibility of an IPv6 with a port which would look like |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @valadas, I've added code to handle the same situation for IPv6 addresses, following your thoughts. |
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.
That looks awesome
Fixes issue #5371.
Summary
Added code to correctly parse the request IP Address when original IP Address comes in the request header "X-Forwarded-For" (i.e. when using an ARR like in an Azure App Service) by removing the port.