]> cat aescling's git repositories - mastodon.git/commitdiff
Fix account processing failing because of large collections (#15027)
authorThibG <thib@sitedethib.com>
Fri, 23 Oct 2020 12:21:31 +0000 (14:21 +0200)
committerGitHub <noreply@github.com>
Fri, 23 Oct 2020 12:21:31 +0000 (14:21 +0200)
Fixes #15025

app/services/activitypub/process_account_service.rb

index 85b915ec6752f4a5e298bf3ff1b4589e232f88fd..9f95f19509a4078a3f425b21744b0e052ea06490 100644 (file)
@@ -196,7 +196,7 @@ class ActivityPub::ProcessAccountService < BaseService
     total_items = collection.is_a?(Hash) && collection['totalItems'].present? && collection['totalItems'].is_a?(Numeric) ? collection['totalItems'] : nil
     has_first_page = collection.is_a?(Hash) && collection['first'].present?
     @collections[type] = [total_items, has_first_page]
-  rescue HTTP::Error, OpenSSL::SSL::SSLError
+  rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::LengthValidationError
     @collections[type] = [nil, nil]
   end