Convert IP spoofing errors into client errors
Currently, IP spoofing attacks result in a 500 response, which counts towards our error budget. Since they're caused by the properties of the client request, it's appropriate to convert them into 400 errors. We don't need to be too worried about the format of this response, as only malicious users will see it.
显示
- changelogs/unreleased/218025-xff-is-a-400-error.yml 5 个添加, 0 个删除changelogs/unreleased/218025-xff-is-a-400-error.yml
- config/application.rb 3 个添加, 0 个删除config/application.rb
- lib/gitlab/middleware/handle_ip_spoof_attack_error.rb 33 个添加, 0 个删除lib/gitlab/middleware/handle_ip_spoof_attack_error.rb
- spec/lib/gitlab/middleware/handle_ip_spoof_attack_error_spec.rb 24 个添加, 0 个删除...ib/gitlab/middleware/handle_ip_spoof_attack_error_spec.rb
- spec/requests/user_spoofs_ip_spec.rb 12 个添加, 0 个删除spec/requests/user_spoofs_ip_spec.rb
spec/requests/user_spoofs_ip_spec.rb
0 → 100644
想要评论请 注册 或 登录