mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-18 18:48:20 +00:00
Merge commit 'c645490d553124d800d30488595f7d2d9d61584d' into glitch-soc/merge-upstream
Conflicts: - `Gemfile.lock`: Changes were already cherry-picked and updated further in glitch-soc. Kept glitch-soc's version. - `README.md`: Upstream updated its README, we have a completely different one. Kept glitch-soc's README. - `app/models/account.rb`: Not a real conflict, upstream updated some lines textually adjacent to glitch-soc-specific lines. Ported upstream's changes.
This commit is contained in:
@@ -188,7 +188,9 @@ class Auth::SessionsController < Devise::SessionsController
|
||||
)
|
||||
|
||||
# Only send a notification email every hour at most
|
||||
return if redis.set("2fa_failure_notification:#{user.id}", '1', ex: 1.hour, get: true).present?
|
||||
return if redis.get("2fa_failure_notification:#{user.id}").present?
|
||||
|
||||
redis.set("2fa_failure_notification:#{user.id}", '1', ex: 1.hour)
|
||||
|
||||
UserMailer.failed_2fa(user, request.remote_ip, request.user_agent, Time.now.utc).deliver_later!
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user