Ignore invalid IPs in X-Forwarded-For when trusted proxies are configured.
What does this MR do?
Catches IPAddr::InvalidAddressError exceptions in trusted_proxy?
when a) a trusted proxy is set up in the gitlab config and b) an invalid IP address is passed to the method (e.g. one with a port attached). When caught, returns false
from the method. Prevents a 500 error in this situation.
What are the relevant issue numbers?
Closes gitlab-org/gitlab-ce#20466.
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - [N/A] Documentation created/updated
- [N/A] API support added
- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together