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/models
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
..
account_suggestions Change auto-following admin-selected accounts, show in recommendations (#16078) 4 years ago
admin Fix 404 error when filtering admin action logs by non-existent target account (#16643) 3 years ago
concerns Add remove from followers api (#16864) 3 years ago
form Add remove from followers api (#16864) 3 years ago
web Add `policy` param to `POST /api/v1/push/subscriptions` (#16040) 4 years ago
account.rb Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
account_alias.rb
account_conversation.rb
account_deletion_request.rb
account_domain_block.rb
account_filter.rb
account_identity_proof.rb
account_migration.rb
account_moderation_note.rb
account_note.rb Fix AccountNote not having a maximum length (#16942) 3 years ago
account_pin.rb
account_stat.rb Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
account_statuses_cleanup_policy.rb Allow keeping only 1 boosts/favs on auto deleting posts (#16653) 3 years ago
account_suggestions.rb Change auto-following admin-selected accounts, show in recommendations (#16078) 4 years ago
account_summary.rb Fix FollowRecommendationsScheduler failing because of unpopulated views (#16189) 3 years ago
account_warning.rb
account_warning_preset.rb
admin.rb
announcement.rb
announcement_filter.rb
announcement_mute.rb
announcement_reaction.rb
application_record.rb
backup.rb
block.rb
bookmark.rb Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
canonical_email_block.rb Fix error when suspending user with an already-existing canonical email block (#17036) 3 years ago
context.rb
conversation.rb
conversation_mute.rb
custom_emoji.rb Switch from unmaintained paperclip to kt-paperclip (#16724) 3 years ago
custom_emoji_category.rb
custom_emoji_filter.rb
custom_filter.rb
device.rb
domain_allow.rb
domain_block.rb
email_domain_block.rb
encrypted_message.rb
export.rb
favourite.rb Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
featured_tag.rb
feed.rb
follow.rb
follow_recommendation.rb Fix FollowRecommendationsScheduler failing because of unpopulated views (#16189) 3 years ago
follow_recommendation_filter.rb Add cold-start follow recommendations (#15945) 4 years ago
follow_recommendation_suppression.rb Add cold-start follow recommendations (#15945) 4 years ago
follow_request.rb Fix edge case where accepted follow cannot be processed because of follow limit (#16098) 4 years ago
home_feed.rb
identity.rb
import.rb
instance.rb Add management of delivery availability in Federation settings (#15771) 3 years ago
instance_filter.rb Add management of delivery availability in Federation settings (#15771) 3 years ago
invite.rb
invite_filter.rb
ip_block.rb
list.rb
list_account.rb
list_feed.rb
login_activity.rb Add authentication history (#16408) 3 years ago
marker.rb
media_attachment.rb Fix error when rendering public pages with media attachments (#16763) 3 years ago
mention.rb
message_franking.rb
mute.rb
notification.rb
one_time_key.rb
poll.rb
poll_vote.rb
preview_card.rb Switch from unmaintained paperclip to kt-paperclip (#16724) 3 years ago
public_feed.rb
relationship_filter.rb
relay.rb
remote_follow.rb
report.rb
report_filter.rb Add ability to filter reports by origin of target account (#16487) 3 years ago
report_note.rb
rule.rb
scheduled_status.rb
search.rb
session_activation.rb Add Ruby 3.0 support (#16046) 3 years ago
setting.rb
site_upload.rb
status.rb Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
status_pin.rb Add feature to automatically delete old toots (#16529) 3 years ago
status_stat.rb
system_key.rb
tag.rb Bump chewy from 5.2.0 to 7.2.3 (supports Elasticsearch 7.x) (#16915) 3 years ago
tag_feed.rb
tag_filter.rb Change trending hashtags to be affected be reblogs (#16164) 3 years ago
tombstone.rb
trending_tags.rb Change trending hashtags to be affected be reblogs (#16164) 3 years ago
unavailable_domain.rb
user.rb Fix reviving revoked sessions and invalidating login (#16943) 3 years ago
user_invite_request.rb
web.rb
webauthn_credential.rb