diff options
author | lain <lain@soykaf.club> | 2020-04-30 14:37:14 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-30 14:37:14 +0200 |
commit | db184a8eb495865334f47a24f8c5b1fec65450b6 (patch) | |
tree | f5b2d62847ee755a112506fa2b2d725b6c952c53 | |
parent | bd219ba7e884d694cc1c8747f0b48cd646821222 (diff) | |
download | pleroma-db184a8eb495865334f47a24f8c5b1fec65450b6.tar.gz |
DeleteValidator: Mastodon sends unaddressed deletes.
-rw-r--r-- | lib/pleroma/web/activity_pub/object_validators/delete_validator.ex | 1 | ||||
-rw-r--r-- | test/web/activity_pub/object_validator_test.exs | 14 |
2 files changed, 0 insertions, 15 deletions
diff --git a/lib/pleroma/web/activity_pub/object_validators/delete_validator.ex b/lib/pleroma/web/activity_pub/object_validators/delete_validator.ex index 8dd5c19ad..0eb31451c 100644 --- a/lib/pleroma/web/activity_pub/object_validators/delete_validator.ex +++ b/lib/pleroma/web/activity_pub/object_validators/delete_validator.ex @@ -32,7 +32,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidators.DeleteValidator do |> validate_inclusion(:type, ["Delete"]) |> validate_same_domain() |> validate_object_presence() - |> validate_recipients_presence() end def validate_same_domain(cng) do diff --git a/test/web/activity_pub/object_validator_test.exs b/test/web/activity_pub/object_validator_test.exs index 64b9ee1ec..ab26d3501 100644 --- a/test/web/activity_pub/object_validator_test.exs +++ b/test/web/activity_pub/object_validator_test.exs @@ -59,20 +59,6 @@ defmodule Pleroma.Web.ActivityPub.ObjectValidatorTest do assert {:actor, {"is not allowed to delete object", []}} in cng.errors end - - test "it's invalid if all the recipient fields are empty", %{ - valid_post_delete: valid_post_delete - } do - empty_recipients = - valid_post_delete - |> Map.put("to", []) - |> Map.put("cc", []) - - {:error, cng} = ObjectValidator.validate(empty_recipients, []) - - assert {:to, {"no recipients in any field", []}} in cng.errors - assert {:cc, {"no recipients in any field", []}} in cng.errors - end end describe "likes" do |