You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mastodon/spec
Claire 02a87431cf
Fix error when suspending user with an already-existing canonical email block (#17036)
* Fix error when suspending user with an already-existing canonical email block

Fixes #17033

While attempting to create a `CanonicalEmailBlock` with an existing hash would
raise an `ActiveRecord::RecordNotUnique` error, this being done within a
transaction would cancel the whole transaction. For this reason, checking for
uniqueness in Rails would query the database within the transaction and avoid
invalidating the whole transaction for this reason.

A race condition is still possible, where multiple accounts sharing a canonical
email would be blocked in concurrent transactions, in which only one would
succeed, but that is way less likely to happen that the current issue, and can
always be retried after the first failure, unlike the current situation.

* Add tests
3 years ago
..
controllers Fix AccountNote not having a maximum length (#16942) 3 years ago
fabricators Add feature to automatically delete old toots (#16529) 4 years ago
features Add submit button to the top of preferences pages (#13068) 5 years ago
fixtures Fix some link previews being incorrectly generated from other prior links (#16885) 4 years ago
helpers Change RTL detection to rely on unicode-bidi paragraph by paragraph (#14573) 4 years ago
lib Add support for structured data and more OpenGraph tags to link cards (#16938) 3 years ago
mailers Add Ruby 3.0 support (#16046) 4 years ago
models Fix error when suspending user with an already-existing canonical email block (#17036) 3 years ago
policies Add support for reversible suspensions through ActivityPub (#14989) 4 years ago
presenters Change references to tootsuite/mastodon to mastodon/mastodon (#16491) 4 years ago
requests Further preparation for Rails 6 (#15916) 4 years ago
routing
serializers/activitypub
services Add support for structured data and more OpenGraph tags to link cards (#16938) 3 years ago
support
validators Add canonical e-mail blocks for suspended accounts (#16049) 4 years ago
views Fix error when rendering public pages with media attachments (#16763) 4 years ago
workers Fix AccountNote not having a maximum length (#16942) 3 years ago
rails_helper.rb Add WebAuthn as an alternative 2FA method (#14466) 5 years ago
spec_helper.rb