Return 404 for quote approval when either quoted or quoting status is deleted (#36194)
This commit is contained in:
parent
4ff215f19b
commit
ea7371c183
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue