Fix incorrect rate limit on PUT requests (#31356)

pull/31484/head
Claire 2024-08-09 16:48:05 +02:00
parent a5b4a2b7e7
commit a5641a9244
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ class Rack::Attack
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|