Limit activity types accepted to outbox to only 'Create'
authorsxsdv1 <sxsdv1@gmail.com>
Sat, 29 Dec 2018 17:22:40 +0000 (18:22 +0100)
committersxsdv1 <sxsdv1@gmail.com>
Sun, 30 Dec 2018 11:01:39 +0000 (12:01 +0100)
lib/pleroma/web/activity_pub/activity_pub_controller.ex

index dca74db739e6356d442fc7891eb886a0475080f4..f90132b4d9005982430a6f44083b31ea60345b9a 100644 (file)
@@ -165,7 +165,10 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
     end
   end
 
-  def update_outbox(%{assigns: %{user: user}} = conn, %{"nickname" => nickname} = params) do
+  def update_outbox(
+        %{assigns: %{user: user}} = conn,
+        %{"nickname" => nickname, "type" => "Create"} = params
+      ) do
     if nickname == user.nickname do
       actor = user.ap_id()