diff options
author | Claire <claire.github-309c@sitedethib.com> | 2023-02-10 22:16:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 22:16:37 +0100 |
commit | 0c9eac80d887cdf7f1efa582b21006248d2f83eb (patch) | |
tree | 208ac4a6745b34f45e5d69b96262ce92aa59c59f /spec/lib | |
parent | 719bb799be9a03b767bd9f55d30abf2b7bc318ec (diff) |
Fix unbounded recursion in post discovery (#23506)
* Add a limit to how many posts can get fetched as a result of a single request * Add tests * Always pass `request_id` when processing `Announce` activities --------- Co-authored-by: nametoolong <nametoolong@users.noreply.github.com>
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/activitypub/activity/add_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/activitypub/activity/add_spec.rb b/spec/lib/activitypub/activity/add_spec.rb index e6408b610..0b08e2924 100644 --- a/spec/lib/activitypub/activity/add_spec.rb +++ b/spec/lib/activitypub/activity/add_spec.rb @@ -48,7 +48,7 @@ RSpec.describe ActivityPub::Activity::Add do end it 'fetches the status and pins it' do - allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil| + allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil, request_id: nil| expect(uri).to eq 'https://example.com/unknown' expect(id).to eq true expect(on_behalf_of&.following?(sender)).to eq true @@ -62,7 +62,7 @@ RSpec.describe ActivityPub::Activity::Add do context 'when there is no local follower' do it 'tries to fetch the status' do - allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil| + allow(service_stub).to receive(:call) do |uri, id: true, on_behalf_of: nil, request_id: nil| expect(uri).to eq 'https://example.com/unknown' expect(id).to eq true expect(on_behalf_of).to eq nil |