diff options
| author | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-08 08:51:09 +0300 |
|---|---|---|
| committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-05-08 08:51:09 +0300 |
| commit | b078e0567dbecc768f88d991a2565141eb9e8c50 (patch) | |
| tree | ed376fc3c17c6e508ac91d8e72cddad128c07c69 /test/web/activity_pub/activity_pub_controller_test.exs | |
| parent | bd261309cc27ebf5d2f78ea3c1474fe71ae8046d (diff) | |
| parent | 769d95644daf07bf27fb483e91d0e793eaa18bd8 (diff) | |
| download | pleroma-b078e0567dbecc768f88d991a2565141eb9e8c50.tar.gz pleroma-b078e0567dbecc768f88d991a2565141eb9e8c50.zip | |
Merge branch 'develop' into issue/1276-2
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 |
