diff options
author | ThibG <thib@sitedethib.com> | 2019-01-26 23:59:39 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-26 23:59:39 +0100 |
commit | e2a5be6e9a070792fa72711c812f75bc61990052 (patch) | |
tree | 33c09bbacbfd1499cb03f40d14ec974aff7ec42f /app | |
parent | 9519d55332a1f22891e5ad8a1de1d2ba027bafc7 (diff) |
Prevent posting toots with media attachments from someone else (#9921)
Diffstat (limited to 'app')
-rw-r--r-- | app/services/post_status_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 1f5a3f4cf..9959bb1fb 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -93,7 +93,7 @@ class PostStatusService < BaseService raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > 4 - @media = MediaAttachment.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i)) + @media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i)) raise Mastodon::ValidationError, I18n.t('media_attachments.validations.images_and_video') if @media.size > 1 && @media.find(&:video?) end |