diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-10-25 04:27:33 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-10-25 04:27:33 +0000 |
commit | 5383887bd4b807edffad2c27338debdc6389a238 (patch) | |
tree | bd89661c9cb8ea20e1b961f49ce0d8a9be52a7b6 /lib | |
parent | 4646794ee2502e9ffd57943a3bb0231d3f235b2b (diff) | |
download | pleroma-5383887bd4b807edffad2c27338debdc6389a238.tar.gz |
transmogrifier: do not try to contain origin of something which doesn't have one
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/activity_pub/transmogrifier.ex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex index 65ac07845..cbc800ad6 100644 --- a/lib/pleroma/web/activity_pub/transmogrifier.ex +++ b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -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)) |