mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-22 06:43:19 +00:00
Throttle IPv6 signup for subnet (#17588)
This commit is contained in:
parent
ac99f586bb
commit
1de2e3f980
|
@ -82,7 +82,9 @@ class Rack::Attack
|
|||
end
|
||||
|
||||
throttle('throttle_sign_up_attempts/ip', limit: 25, period: 5.minutes) do |req|
|
||||
req.remote_ip if req.post? && req.path == '/auth'
|
||||
return unless req.post? && req.path == '/auth'
|
||||
return req.remote_ip.mask(64) if req.remote_ip.ipv6?
|
||||
req.remote_ip
|
||||
end
|
||||
|
||||
throttle('throttle_password_resets/ip', limit: 25, period: 5.minutes) do |req|
|
||||
|
|
Loading…
Reference in a new issue