mirror of
https://github.com/jtomchak/akkoma.git
synced 2025-01-31 20:09:08 +01:00
transmogrifier: do not try to contain origin of something which doesn't have one
This commit is contained in:
parent
4646794ee2
commit
5383887bd4
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do
|
|||
@doc """
|
||||
Checks that an imported AP object's actor matches the domain it came from.
|
||||
"""
|
||||
def contain_origin(id, %{"actor" => nil}), do: :error
|
||||
|
||||
def contain_origin(id, %{"actor" => actor} = params) do
|
||||
id_uri = URI.parse(id)
|
||||
actor_uri = URI.parse(get_actor(params))
|
||||
|
|
Loading…
Reference in a new issue