about summary refs log tree commit diff
path: root/app/controllers/api/v1/statuses
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-11 12:46:50 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:17 -0500
commit163bc1a706e9a94687d28c885c1ff02089498b94 (patch)
tree5ea1d2afcc87b216763d33f3590f15150498837b /app/controllers/api/v1/statuses
parent351b3819b29b316136553e1f88032a9df9a7a731 (diff)
[Privacy] Check permissions of boosts and dereference boosts before sending to public timelines
Diffstat (limited to 'app/controllers/api/v1/statuses')
-rw-r--r--app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb1
-rw-r--r--app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb b/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
index 8229786d6..45dc212bb 100644
--- a/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
+++ b/app/controllers/api/v1/statuses/favourited_by_accounts_controller.rb
@@ -66,6 +66,7 @@ class Api::V1::Statuses::FavouritedByAccountsController < Api::BaseController
   def set_status
     @status = Status.find(params[:status_id])
     authorize @status, :show?
+    authorize @status.reblog, :show? if @status.reblog?
   rescue Mastodon::NotPermittedError
     not_found
   end
diff --git a/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb b/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
index 6c9e49d90..cc8c75ea0 100644
--- a/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
+++ b/app/controllers/api/v1/statuses/reblogged_by_accounts_controller.rb
@@ -63,6 +63,7 @@ class Api::V1::Statuses::RebloggedByAccountsController < Api::BaseController
   def set_status
     @status = Status.find(params[:status_id])
     authorize @status, :show?
+    authorize @status.reblog, :show? if @status.reblog?
   rescue Mastodon::NotPermittedError
     not_found
   end