From: Haelwenn (lanodan) Monnier Date: Fri, 21 Sep 2018 09:41:20 +0000 (+0200) Subject: [Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg] X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=523757be52749b97ffcfad3d06ab6d0c0e2f8aab;p=akkoma [Pleroma.Web.ActivityPub.ActivityPub]: Harden getting endpoints [kroeg] --- diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index 361e93e91..46dabd5de 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -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)