CommonAPI: Prevent users from accessing media of other users
This commit is contained in:
parent
9da4f89b7b
commit
1afde067b1
9 changed files with 82 additions and 31 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