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 Fix reviving revoked sessions and invalidating login (#16943) 3 years ago
helpers Add Northern Kurdish locale as requested by translator. It already has a project started on Crowdin. (#16548) 3 years ago
javascript Fix overflow of long profile fields in admin view (#17010) 3 years ago
lib Fix confusing error when webfinger request returns empty document (#16986) 3 years ago
mailers Prepare Mastodon for Rails 6 (#15911) 4 years ago
models Fix error when suspending user with an already-existing canonical email block (#17036) 3 years ago
policies Add ability to skip sign-in token authentication for specific users (#16427) 4 years ago
presenters Add graphs and retention metrics to admin dashboard (#16829) 3 years ago
serializers Add graphs and retention metrics to admin dashboard (#16829) 3 years ago
services Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
validators Minor memory optimizations (#16507) 3 years ago
views Add graphs and retention metrics to admin dashboard (#16829) 3 years ago
workers Fix AccountNote not having a maximum length (#16942) 3 years ago