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/app
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
..
chewy Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
controllers
helpers
javascript Fix overflow of long profile fields in admin view (#17010) 3 years ago
lib
mailers
models Fix error when suspending user with an already-existing canonical email block (#17036) 3 years ago
policies
presenters
serializers
services Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
validators
views
workers