mirror of
https://github.com/mastodon/mastodon.git
synced 2026-08-28 23:25:26 -05:00
Forbid interactions with reblogs in /api/v1/statuses/:id endpoints
Fixes #23095, #37999
This commit is contained in:
@@ -12,5 +12,7 @@ class Api::V1::Statuses::BaseController < Api::BaseController
|
||||
authorize @status, :show?
|
||||
rescue ActiveRecord::RecordNotFound, Mastodon::NotPermittedError
|
||||
not_found
|
||||
else
|
||||
render json: { error: 'This operation is not allowed on reblogs' }, status: 400 if @status.reblog?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user