about summary refs log tree commit diff
path: root/app/services/activitypub
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-02-21 02:04:25 -0600
committermultiple creatures <dev@multiple-creature.party>2020-02-21 02:06:11 -0600
commit8caf9e4ede78b434443cc2cd65aeaae4412b288f (patch)
tree8843021088d03f34b9a50f66359fd5ef9b5ceca6 /app/services/activitypub
parent8a60792b01780b4741d1c6de0048bccd9887cb01 (diff)
remove autoreject implementation, superseded by monsterfork graylisting + upstream privacy improvements
Diffstat (limited to 'app/services/activitypub')
-rw-r--r--app/services/activitypub/fetch_remote_account_service.rb2
-rw-r--r--app/services/activitypub/fetch_remote_status_service.rb2
-rw-r--r--app/services/activitypub/fetch_replies_service.rb2
3 files changed, 1 insertions, 5 deletions
diff --git a/app/services/activitypub/fetch_remote_account_service.rb b/app/services/activitypub/fetch_remote_account_service.rb
index 381726c35..36a327731 100644
--- a/app/services/activitypub/fetch_remote_account_service.rb
+++ b/app/services/activitypub/fetch_remote_account_service.rb
@@ -12,7 +12,6 @@ class ActivityPub::FetchRemoteAccountService < BaseService
     return if domain_not_allowed?(uri)
     return ActivityPub::TagManager.instance.uri_to_resource(uri, Account) if ActivityPub::TagManager.instance.local_uri?(uri)
 
-    return if autoreject?(uri)
     @json = begin
       if prefetched_body.nil?
         fetch_resource(uri, id)
@@ -21,7 +20,6 @@ class ActivityPub::FetchRemoteAccountService < BaseService
       end
     end
 
-    return if autoreject?
     return if !supported_context? || !expected_type? || (break_on_redirect && @json['movedTo'].present?)
 
     @uri      = @json['id']
diff --git a/app/services/activitypub/fetch_remote_status_service.rb b/app/services/activitypub/fetch_remote_status_service.rb
index 9795cf651..0779f13cc 100644
--- a/app/services/activitypub/fetch_remote_status_service.rb
+++ b/app/services/activitypub/fetch_remote_status_service.rb
@@ -6,7 +6,6 @@ class ActivityPub::FetchRemoteStatusService < BaseService
 
   # Should be called when uri has already been checked for locality
   def call(uri, id: true, prefetched_body: nil, on_behalf_of: nil, announced_by: nil, requested: false)
-    return if autoreject?(uri)
     @json = begin
       if prefetched_body.nil?
         fetch_resource(uri, id, on_behalf_of)
@@ -15,7 +14,6 @@ class ActivityPub::FetchRemoteStatusService < BaseService
       end
     end
 
-    return if autoreject?
     return if !(supported_context? && expected_type?) || actor_id.nil? || !trustworthy_attribution?(@json['id'], actor_id)
 
     actor = ActivityPub::TagManager.instance.uri_to_resource(actor_id, Account)
diff --git a/app/services/activitypub/fetch_replies_service.rb b/app/services/activitypub/fetch_replies_service.rb
index 3e9a2f02a..6aae16dc1 100644
--- a/app/services/activitypub/fetch_replies_service.rb
+++ b/app/services/activitypub/fetch_replies_service.rb
@@ -45,7 +45,7 @@ class ActivityPub::FetchRepliesService < BaseService
     # amplification attacks.
 
     # Also limit to 5 fetched replies to limit potential for DoS.
-    @items.map { |item| value_or_id(item) }.reject { |uri| autoreject?(uri) || invalid_origin?(uri) }.take(5)
+    @items.map { |item| value_or_id(item) }.reject { |uri| invalid_origin?(uri) }.take(5)
   end
 
   def object_uri