diff --git a/lib/gitlab/auth/rate_limiter.rb b/lib/gitlab/auth/rate_limiter.rb index 4be9f6d0efed1219486dccc5f606908fc6df2f94..1089bc9f89e43dd88be362a3a5bc5689f86e20b0 100644 --- a/lib/gitlab/auth/rate_limiter.rb +++ b/lib/gitlab/auth/rate_limiter.rb @@ -20,7 +20,7 @@ module Gitlab # Allow2Ban.filter will return false if this IP has not failed too often yet @banned = Rack::Attack::Allow2Ban.filter(ip, config) do # If we return false here, the failure for this IP is ignored by Allow2Ban - ignore_failure? + ip_can_be_banned? end end @@ -34,7 +34,7 @@ module Gitlab Gitlab.config.rack_attack.git_basic_auth end - def ignore_failure? + def ip_can_be_banned? config.ip_whitelist.exclude?(ip) end end