Skip to content
Snippets Groups Projects
Unverified Commit 1de2e3f9 authored by Jeong Arm's avatar Jeong Arm Committed by GitHub
Browse files

Throttle IPv6 signup for subnet (#17588)

parent ac99f586
No related branches found
No related tags found
No related merge requests found
......@@ -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|
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment