Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-29 11:20:38 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-29 11:20:57 +0300
commit4c4f653296e104566d2dd9a330b460c7ddc8cfc5 (patch)
tree69309f00de031698da9ea139f53e3f78c3ab61f0 /lib/gitlab/rack_attack.rb
parent7b1c7e980459210bea3f967cbc6b1c797c1ff658 (diff)
Add latest changes from gitlab-org/security/gitlab@14-10-stable-ee
Diffstat (limited to 'lib/gitlab/rack_attack.rb')
-rw-r--r--lib/gitlab/rack_attack.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab/rack_attack.rb b/lib/gitlab/rack_attack.rb
index 3f4c0fa45aa..b2664f87306 100644
--- a/lib/gitlab/rack_attack.rb
+++ b/lib/gitlab/rack_attack.rb
@@ -95,7 +95,7 @@ module Gitlab
authenticated_options = Gitlab::Throttle.options(throttle, authenticated: true)
throttle_or_track(rack_attack, "throttle_authenticated_#{throttle}", authenticated_options) do |req|
if req.throttle?(throttle, authenticated: true)
- req.throttled_user_id([:api])
+ req.throttled_identifer([:api])
end
end
end
@@ -117,7 +117,7 @@ module Gitlab
throttle_or_track(rack_attack, 'throttle_authenticated_web', Gitlab::Throttle.authenticated_web_options) do |req|
if req.throttle_authenticated_web?
- req.throttled_user_id([:api, :rss, :ics])
+ req.throttled_identifer([:api, :rss, :ics])
end
end
@@ -129,19 +129,19 @@ module Gitlab
throttle_or_track(rack_attack, 'throttle_authenticated_protected_paths_api', Gitlab::Throttle.protected_paths_options) do |req|
if req.throttle_authenticated_protected_paths_api?
- req.throttled_user_id([:api])
+ req.throttled_identifer([:api])
end
end
throttle_or_track(rack_attack, 'throttle_authenticated_protected_paths_web', Gitlab::Throttle.protected_paths_options) do |req|
if req.throttle_authenticated_protected_paths_web?
- req.throttled_user_id([:api, :rss, :ics])
+ req.throttled_identifer([:api, :rss, :ics])
end
end
throttle_or_track(rack_attack, 'throttle_authenticated_git_lfs', Gitlab::Throttle.throttle_authenticated_git_lfs_options) do |req|
if req.throttle_authenticated_git_lfs?
- req.throttled_user_id([:api])
+ req.throttled_identifer([:api])
end
end