diff options
| author | lain <lain@soykaf.club> | 2020-05-08 13:13:37 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-05-08 13:13:37 +0200 |
| commit | 7637ef42033b2da79ca61e9dee8fb4187d1a8257 (patch) | |
| tree | 9b42481388e596d5b5c24a8e3fd22fcdcd69bb46 /test/web/activity_pub/activity_pub_controller_test.exs | |
| parent | fb2d284d2897e8b789da4f81ae8d288373d2bf76 (diff) | |
| parent | fbcc53760e6fcd393513c05a5bd7a4a6a6f3b731 (diff) | |
| download | pleroma-7637ef42033b2da79ca61e9dee8fb4187d1a8257.tar.gz pleroma-7637ef42033b2da79ca61e9dee8fb4187d1a8257.zip | |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
Diffstat (limited to 'test/web/activity_pub/activity_pub_controller_test.exs')
| -rw-r--r-- | test/web/activity_pub/activity_pub_controller_test.exs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/web/activity_pub/activity_pub_controller_test.exs b/test/web/activity_pub/activity_pub_controller_test.exs index 5c8d20ac4..776ddc8d4 100644 --- a/test/web/activity_pub/activity_pub_controller_test.exs +++ b/test/web/activity_pub/activity_pub_controller_test.exs @@ -815,6 +815,21 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do assert object["content"] == activity["object"]["content"] end + test "it rejects anything beyond 'Note' creations", %{conn: conn, activity: activity} do + user = insert(:user) + + activity = + activity + |> put_in(["object", "type"], "Benis") + + _result = + conn + |> assign(:user, user) + |> put_req_header("content-type", "application/activity+json") + |> post("/users/#{user.nickname}/outbox", activity) + |> json_response(400) + end + test "it inserts an incoming sensitive activity into the database", %{ conn: conn, activity: activity |
