Skip to content

Commit

Permalink
Fix incorrect rate limit on PUT requests (mastodon#31356)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored Aug 9, 2024
1 parent 1701575 commit eaedd52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/initializers/rack_attack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def paging_request?
end

throttle('throttle_password_change/account', limit: 10, period: 10.minutes) do |req|
req.warden_user_id if req.put? || (req.patch? && req.path_matches?('/auth'))
req.warden_user_id if (req.put? || req.patch?) && (req.path_matches?('/auth') || req.path_matches?('/auth/password'))
end

self.throttled_responder = lambda do |request|
Expand Down

0 comments on commit eaedd52

Please sign in to comment.