diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-02 03:07:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-02 03:07:06 +0300 |
commit | b26eec8cbcf32085079eee0e196456eccefc993f (patch) | |
tree | 822f69aeec23b0b3512583b2221000a8035241f7 /lib/gitlab/auth.rb | |
parent | 61666f277a484725307ae2b34697b13a300b2129 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/auth.rb')
-rw-r--r-- | lib/gitlab/auth.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/gitlab/auth.rb b/lib/gitlab/auth.rb index c567df8e133..7e8f9c76dea 100644 --- a/lib/gitlab/auth.rb +++ b/lib/gitlab/auth.rb @@ -135,15 +135,13 @@ module Gitlab # it is important to reset the ban counter once the client has proven # they are not a 'bad guy'. rate_limiter.reset! - else + elsif rate_limiter.register_fail! # Register a login failure so that Rack::Attack can block the next # request from this IP if needed. # This returns true when the failures are over the threshold and the IP # is banned. - if rate_limiter.register_fail! - Gitlab::AppLogger.info "IP #{rate_limiter.ip} failed to login " \ + Gitlab::AppLogger.info "IP #{rate_limiter.ip} failed to login " \ "as #{login} but has been temporarily banned from Git auth" - end end end |