[Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg]
authorHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Fri, 21 Sep 2018 09:41:20 +0000 (11:41 +0200)
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>
Thu, 27 Sep 2018 18:00:45 +0000 (20:00 +0200)
lib/pleroma/web/activity_pub/activity_pub.ex

index 361e93e91c8b081c9422d08091027772dd93d213..46dabd5dea1563ccb40185ad8cb12d9084e33125 100644 (file)
@@ -683,7 +683,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do
       (Pleroma.Web.Salmon.remote_users(activity) ++ followers)
       |> Enum.filter(fn user -> User.ap_enabled?(user) end)
       |> Enum.map(fn %{info: %{"source_data" => data}} ->
-        (data["endpoints"] && data["endpoints"]["sharedInbox"]) || data["inbox"]
+        (is_map(data["endpoints"]) && Map.get(data["endpoints"], "sharedInbox")) || data["inbox"]
       end)
       |> Enum.uniq()
       |> Enum.filter(fn inbox -> should_federate?(inbox, public) end)