Forbid interactions with reblogs in /api/v1/statuses/:id endpoints

Fixes #23095, #37999
This commit is contained in:
Claire 2026-02-27 15:47:46 +01:00
parent 1e5cad072e
commit 6aefa51465

View File

@ -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