Return 404 for quote approval when either quoted or quoting status is deleted (#36194)

This commit is contained in:
Claire 2025-09-19 14:55:30 +02:00 committed by GitHub
parent 4ff215f19b
commit ea7371c183
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,6 +21,8 @@ class ActivityPub::QuoteAuthorizationsController < ActivityPub::BaseController
def set_quote_authorization
@quote = Quote.accepted.where(quoted_account: @account).find(params[:id])
return not_found unless @quote.status.present? && @quote.quoted_status.present?
authorize @quote.status, :show?
rescue Mastodon::NotPermittedError
not_found