diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-03 21:06:23 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-03 21:06:23 +0000 |
commit | 4529c19950e412f0461910585414f8633d3b1b18 (patch) | |
tree | 00b75c579ef52b41fea09c516cd5286dee5df703 /app/controllers | |
parent | ab7cf450ba19cf80b9534f25dc707b33845e3014 (diff) | |
download | gitlab-ce-4529c19950e412f0461910585414f8633d3b1b18.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4d55d7f00f0..ee2b3741ac9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -74,6 +74,18 @@ class ApplicationController < ActionController::Base render_403 end + rescue_from Gitlab::Auth::IpBlacklisted do + Gitlab::AuthLogger.error( + message: 'Rack_Attack', + env: :blocklist, + remote_ip: request.ip, + request_method: request.request_method, + path: request.fullpath + ) + + head :forbidden + end + rescue_from Gitlab::Auth::TooManyIps do |e| head :forbidden, retry_after: Gitlab::Auth::UniqueIpsLimiter.config.unique_ips_limit_time_window end |