{"push_id":1453210859,"size":1,"distinct_size":1,"ref":"refs/heads/bugfix/130728371-improve_xff_test","head":"3adbe802ca30424bd0df294c6321a660710f5fa9","before":"e61acaf28eeb03b10d4d6fcc196a14c7522e5235","commits":[{"sha":"3adbe802ca30424bd0df294c6321a660710f5fa9","author":{"name":"Dan Carley","email":"04c8d52955ea1a89c2f0ed83d99cd9b0c494607f@gmail.com"},"message":"wip: acceptance-tests: Improve XFF request header tests\n\nThe existing tests made it quite hard to understand the complete behaviour,\ne.g. the real egress IP is the second-to-last element rather than the last\nelement.\n\nThey were also susceptible to a false-positive result because we were\nchecking that the second element wasn't on the 10/8 private network, rather\nthan asserting the value of the second-to-last element. So they would\ncontinue passing if an intermediate proxy inserted more elements before our\negress IP.\n\nMake the tests clearer and more strict by obtaining our real egress IP and\ncomparing the entire contents of the header. Unfortunately we need to use a\nthird-party service to get our egress IP. I chose to use `canhazip.com`\nbecause the response format is simple and it's reputable. There's some more\ninformation about it here:\n\n- https://major.io/icanhazip-com-faq/\n\n- external service\n- extra ip\n- intermediate false positive","distinct":true,"url":"https://api.github.com/repos/alphagov/paas-cf/commits/3adbe802ca30424bd0df294c6321a660710f5fa9"}]}
{"actor":{"display_login":"dcarley"}}