object: containment: don't try to contain ostatus objects
authorAriadne Conill <ariadne@dereferenced.org>
Fri, 18 Oct 2019 03:26:50 +0000 (03:26 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Fri, 18 Oct 2019 14:50:10 +0000 (14:50 +0000)
lib/pleroma/object/containment.ex

index f077a9f32436841f1ffb01975c970d3082fd80a7..cd86238216d91c86dd026bfbcbfde6e846ec2ba2 100644 (file)
@@ -57,7 +57,9 @@ defmodule Pleroma.Object.Containment do
     id_uri = URI.parse(id)
     other_uri = URI.parse(other_id)
 
-    if id_uri.host == other_uri.host do
+    # We explicitly allow 'tag' URIs through, due to legacy OStatus objects
+    # being present in the ActivityPub network.
+    if id_uri.host == other_uri.host || other_uri.scheme == "tag" do
       :ok
     else
       :error