CommonAPI: Prevent users from accessing media of other users
commit 1afde067b1 upstream.
This commit is contained in:
parent
1f4be2b349
commit
535a5ecad0
9 changed files with 85 additions and 30 deletions
|
|
@ -111,7 +111,7 @@ defmodule Pleroma.Web.CommonAPI.ActivityDraft do
|
|||
end
|
||||
|
||||
defp attachments(%{params: params} = draft) do
|
||||
attachments = Utils.attachments_from_ids(params)
|
||||
attachments = Utils.attachments_from_ids(params, draft.user)
|
||||
draft = %__MODULE__{draft | attachments: attachments}
|
||||
|
||||
case Utils.validate_attachments_count(attachments) do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue