tests: fix object containment violations in the transmogrifier tests
authorAriadne Conill <ariadne@dereferenced.org>
Sun, 14 Jul 2019 17:49:12 +0000 (17:49 +0000)
committerAriadne Conill <ariadne@dereferenced.org>
Sun, 14 Jul 2019 19:24:22 +0000 (19:24 +0000)
Some objects were not completely rewritten in the tests, which caused object
containment violations.  Fix them by rewriting the object IDs to be in an
appropriate namespace.

CHANGELOG.md
test/web/activity_pub/transmogrifier_test.exs

index 0cec3bf5c50b1b823f0ca52259f3a22d8a3e5861..e7d7e0ef5bf796976b6426337b51e44e447fc36c 100644 (file)
@@ -42,6 +42,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 - Admin API: changed json structure for saving config settings.
 - RichMedia: parsers and their order are configured in `rich_media` config.
 
+## [1.0.1] - 2019-07-14
+### Security
+- OStatus: fix an object spoofing vulnerability.
+
 ## [1.0.0] - 2019-06-29
 ### Security
 - Mastodon API: Fix display names not being sanitized
index b896a532b806e4d950e7fe7b378107bf2727851f..cabe925f937927545fb5fcab55cde1c21ccde41d 100644 (file)
@@ -416,6 +416,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
         |> Map.put("attributedTo", user.ap_id)
         |> Map.put("to", ["https://www.w3.org/ns/activitystreams#Public"])
         |> Map.put("cc", [])
+        |> Map.put("id", user.ap_id <> "/activities/12345678")
 
       data = Map.put(data, "object", object)
 
@@ -439,6 +440,7 @@ defmodule Pleroma.Web.ActivityPub.TransmogrifierTest do
         |> Map.put("attributedTo", user.ap_id)
         |> Map.put("to", nil)
         |> Map.put("cc", nil)
+        |> Map.put("id", user.ap_id <> "/activities/12345678")
 
       data = Map.put(data, "object", object)