Merge branch 'main' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2022-02-19 11:33:18 +01:00
215 changed files with 3330 additions and 1634 deletions

View File

@ -82,7 +82,13 @@ 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'
if req.post? && req.path == '/auth'
if req.remote_ip.ipv6?
req.remote_ip.mask(64)
else
req.remote_ip
end
end
end
throttle('throttle_password_resets/ip', limit: 25, period: 5.minutes) do |req|