diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-10-13 17:05:18 -0700 |
---|---|---|
committer | Francisco Lopez <fjlopez@gitlab.com> | 2017-11-17 09:58:18 +0100 |
commit | 43a682ccaa694d2a14f3d639d66708057859a628 (patch) | |
tree | d77db36eb817035efed3fdb2ec163615bdbc9336 /config | |
parent | d87030714a654b0dfa47aa6b38eb970731e7a04e (diff) | |
download | gitlab-ce-43a682ccaa694d2a14f3d639d66708057859a628.tar.gz |
Fix OAuth API and RSS rate limiting
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/rack_attack_global.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/config/initializers/rack_attack_global.rb b/config/initializers/rack_attack_global.rb index 3073ba06ac1..cf87310d7b7 100644 --- a/config/initializers/rack_attack_global.rb +++ b/config/initializers/rack_attack_global.rb @@ -45,7 +45,7 @@ class Rack::Attack end def authenticated_user_id - session_user_id || sessionless_user_id + Gitlab::Auth::RequestAuthenticator.new(self).user&.id end def api_request? @@ -55,15 +55,5 @@ class Rack::Attack def web_request? !api_request? end - - private - - def session_user_id - Gitlab::Auth.find_session_user(self)&.id - end - - def sessionless_user_id - Gitlab::Auth.find_sessionless_user(self)&.id - end end end |