mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-28 12:00:36 +01:00
Fix rate-limiting incorrectly triggering a session cookie on most endpoints (#30483)
This commit is contained in:
parent
d770b61a74
commit
95ebcff98e
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ class Rack::Attack
|
|||
end
|
||||
|
||||
def authenticated_user_id
|
||||
authenticated_token&.resource_owner_id || warden_user_id
|
||||
authenticated_token&.resource_owner_id
|
||||
end
|
||||
|
||||
def authenticated_token_id
|
||||
|
@ -138,7 +138,7 @@ class Rack::Attack
|
|||
end
|
||||
|
||||
throttle('throttle_password_change/account', limit: 10, period: 10.minutes) do |req|
|
||||
req.authenticated_user_id if req.put? || (req.patch? && req.path_matches?('/auth'))
|
||||
req.warden_user_id if req.put? || (req.patch? && req.path_matches?('/auth'))
|
||||
end
|
||||
|
||||
self.throttled_responder = lambda do |request|
|
||||
|
|
Loading…
Reference in a new issue