Commit 03bec6b0 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Argh mixed up all the negatives

parent 1fab5832
...@@ -20,7 +20,7 @@ module Gitlab ...@@ -20,7 +20,7 @@ module Gitlab
# Allow2Ban.filter will return false if this IP has not failed too often yet # Allow2Ban.filter will return false if this IP has not failed too often yet
@banned = Rack::Attack::Allow2Ban.filter(ip, config) do @banned = Rack::Attack::Allow2Ban.filter(ip, config) do
# If we return false here, the failure for this IP is ignored by Allow2Ban # If we return false here, the failure for this IP is ignored by Allow2Ban
ignore_failure? ip_can_be_banned?
end end
end end
...@@ -34,7 +34,7 @@ module Gitlab ...@@ -34,7 +34,7 @@ module Gitlab
Gitlab.config.rack_attack.git_basic_auth Gitlab.config.rack_attack.git_basic_auth
end end
def ignore_failure? def ip_can_be_banned?
config.ip_whitelist.exclude?(ip) config.ip_whitelist.exclude?(ip)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment