mastodon/app/models
Claire 84ceebe1c4
Fix media attachment size validation not correctly accounting for file type (#16819)
* Fix media attachment size validation not correctly accounting for file type

Fixes a regression introduced in #16724 caused by the fact that kt-paperclip
now correctly runs validations before processing, meaning that file size
verification could not rely on our before_post_processing hook.

Moved the `before_post_processing` hooks to `before_validate` to make sure
the media attachment type is set correctly before the file gets validated.

* Add tests
2021-10-06 14:49:32 +01:00
..
account_suggestions
admin
concerns
form
web
account.rb
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
account_pin.rb
account_stat.rb
account_statuses_cleanup_policy.rb
account_suggestions.rb
account_summary.rb
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 Add feature to automatically delete old toots (#16529) 2021-08-09 23:11:50 +02:00
canonical_email_block.rb
context.rb
conversation.rb
conversation_mute.rb
custom_emoji.rb
custom_emoji_category.rb
custom_emoji_filter.rb
custom_filter.rb
device.rb
domain_allow.rb
domain_block.rb
email_domain_block.rb Add option to include resolved DNS records when blacklisting e-mail domains in admin UI (#13254) 2020-03-12 22:35:20 +01:00
encrypted_message.rb
export.rb
favourite.rb
featured_tag.rb
feed.rb
follow.rb
follow_recommendation.rb
follow_recommendation_filter.rb
follow_recommendation_suppression.rb
follow_request.rb
home_feed.rb
identity.rb
import.rb
instance.rb
instance_filter.rb
invite.rb
invite_filter.rb
ip_block.rb Add IP-based rules (#14963) 2020-10-12 16:33:49 +02:00
list.rb
list_account.rb
list_feed.rb
login_activity.rb
marker.rb
media_attachment.rb Fix media attachment size validation not correctly accounting for file type (#16819) 2021-10-06 14:49:32 +01:00
mention.rb
message_franking.rb
mute.rb
notification.rb
one_time_key.rb
poll.rb
poll_vote.rb
preview_card.rb
public_feed.rb Fix rubocop config and warnings (#15503) 2021-01-07 09:40:55 +01:00
relationship_filter.rb
relay.rb
remote_follow.rb
report.rb
report_filter.rb
report_note.rb
rule.rb
scheduled_status.rb
search.rb
session_activation.rb
setting.rb
site_upload.rb
status.rb
status_pin.rb
status_stat.rb
system_key.rb
tag.rb Change trending hashtags to be affected be reblogs (#16164) 2021-05-07 14:33:43 +02:00
tag_feed.rb
tag_filter.rb
tombstone.rb
trending_tags.rb
unavailable_domain.rb
user.rb
user_invite_request.rb
web.rb
webauthn_credential.rb