diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2016-06-03 18:14:13 +0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2016-06-03 18:14:13 +0300 |
commit | 03bec6b0e943a3a047fd8f6185f71a976c02506c (patch) | |
tree | e72c6f40b3ffb3b895d898cdc9af980c9b845c04 /lib/gitlab/auth | |
parent | 1fab583266af0904dfc29facfe4551e37c06342a (diff) |
Argh mixed up all the negatives
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r-- | lib/gitlab/auth/rate_limiter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/auth/rate_limiter.rb b/lib/gitlab/auth/rate_limiter.rb index 4be9f6d0efe..1089bc9f89e 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 |