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 /app/workers/thread_resolve_worker.rb | |
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 'app/workers/thread_resolve_worker.rb')
-rw-r--r-- | app/workers/thread_resolve_worker.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/workers/thread_resolve_worker.rb b/app/workers/thread_resolve_worker.rb index 1b77dfdd9..3206c45f6 100644 --- a/app/workers/thread_resolve_worker.rb +++ b/app/workers/thread_resolve_worker.rb @@ -6,9 +6,9 @@ class ThreadResolveWorker sidekiq_options queue: 'pull', retry: 3 - def perform(child_status_id, parent_url) + def perform(child_status_id, parent_url, options = {}) child_status = Status.find(child_status_id) - parent_status = FetchRemoteStatusService.new.call(parent_url) + parent_status = FetchRemoteStatusService.new.call(parent_url, **options.deep_symbolize_keys) return if parent_status.nil? |