mirror of
https://github.com/mastodon/mastodon.git
synced 2025-10-05 16:42:47 +00:00
Return 404 for quote approval when either quoted or quoting status is deleted (#36194)
This commit is contained in:
parent
4ff215f19b
commit
ea7371c183
|
@ -21,6 +21,8 @@ class ActivityPub::QuoteAuthorizationsController < ActivityPub::BaseController
|
||||||
|
|
||||||
def set_quote_authorization
|
def set_quote_authorization
|
||||||
@quote = Quote.accepted.where(quoted_account: @account).find(params[:id])
|
@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?
|
authorize @quote.status, :show?
|
||||||
rescue Mastodon::NotPermittedError
|
rescue Mastodon::NotPermittedError
|
||||||
not_found
|
not_found
|
||||||
|
|
Loading…
Reference in New Issue
Block a user