summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-06-03 17:14:13 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-06-03 17:14:13 +0200
commit03bec6b0e943a3a047fd8f6185f71a976c02506c (patch)
treee72c6f40b3ffb3b895d898cdc9af980c9b845c04
parent1fab583266af0904dfc29facfe4551e37c06342a (diff)
downloadgitlab-ce-03bec6b0e943a3a047fd8f6185f71a976c02506c.tar.gz
Argh mixed up all the negatives
-rw-r--r--lib/gitlab/auth/rate_limiter.rb4
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