about summary refs log tree commit diff
path: root/spec/lib/activitypub/activity/announce_spec.rb
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2024-02-16 11:56:12 +0100
committerStarfall <us@starfall.systems>2024-02-16 11:19:46 -0600
commit41a1757aecf7d894965b45abece8cbc408f8f99c (patch)
tree857a5c25e55a4cd7311ac32059c8ee597ff2335c /spec/lib/activitypub/activity/announce_spec.rb
parent8f6a0c2cc87d4515ffa3be0ab8768ced5dcb5850 (diff)
Merge pull request from GHSA-jhrq-qvrm-qr36 hotfix
* Fix insufficient Content-Type checking of fetched ActivityStreams objects

* Allow JSON-LD documents with multiple profiles
Diffstat (limited to 'spec/lib/activitypub/activity/announce_spec.rb')
-rw-r--r--spec/lib/activitypub/activity/announce_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/activitypub/activity/announce_spec.rb b/spec/lib/activitypub/activity/announce_spec.rb
index 394b1d7b9..e765f4f0a 100644
--- a/spec/lib/activitypub/activity/announce_spec.rb
+++ b/spec/lib/activitypub/activity/announce_spec.rb
@@ -35,7 +35,7 @@ RSpec.describe ActivityPub::Activity::Announce do
     context 'when sender is followed by a local account' do
       before do
         Fabricate(:account).follow!(sender)
-        stub_request(:get, 'https://example.com/actor/hello-world').to_return(body: Oj.dump(unknown_object_json))
+        stub_request(:get, 'https://example.com/actor/hello-world').to_return(body: Oj.dump(unknown_object_json), headers: { 'Content-Type': 'application/activity+json' })
         subject.perform
       end
 
@@ -120,7 +120,7 @@ RSpec.describe ActivityPub::Activity::Announce do
       let(:object_json) { 'https://example.com/actor/hello-world' }
 
       before do
-        stub_request(:get, 'https://example.com/actor/hello-world').to_return(body: Oj.dump(unknown_object_json))
+        stub_request(:get, 'https://example.com/actor/hello-world').to_return(body: Oj.dump(unknown_object_json), headers: { 'Content-Type': 'application/activity+json' })
       end
 
       context 'and the relay is enabled' do