Autofix Rubocop remaining Layout rules (#23679)
This commit is contained in:
parent
d2dcb6c45a
commit
717683d1c3
117 changed files with 265 additions and 261 deletions
|
@ -50,6 +50,7 @@ class ActivityPub::FetchRemoteActorService < BaseService
|
|||
|
||||
if @username.casecmp(confirmed_username).zero? && @domain.casecmp(confirmed_domain).zero?
|
||||
raise Error, "Webfinger response for #{@username}@#{@domain} does not loop back to #{@uri}" if webfinger.link('self', 'href') != @uri
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -56,6 +56,7 @@ class ActivityPub::FetchRemoteStatusService < BaseService
|
|||
|
||||
def trustworthy_attribution?(uri, attributed_to)
|
||||
return false if uri.nil? || attributed_to.nil?
|
||||
|
||||
Addressable::URI.parse(uri).normalized_host.casecmp(Addressable::URI.parse(attributed_to).normalized_host).zero?
|
||||
end
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ class ActivityPub::FetchRepliesService < BaseService
|
|||
return collection_or_uri if collection_or_uri.is_a?(Hash)
|
||||
return unless @allow_synchronous_requests
|
||||
return if invalid_origin?(collection_or_uri)
|
||||
|
||||
fetch_resource_without_id_validation(collection_or_uri, nil, true)
|
||||
end
|
||||
|
||||
|
|
|
@ -226,6 +226,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
|
||||
def property_values
|
||||
return unless @json['attachment'].is_a?(Array)
|
||||
|
||||
as_array(@json['attachment']).select { |attachment| attachment['type'] == 'PropertyValue' }.map { |attachment| attachment.slice('name', 'value') }
|
||||
end
|
||||
|
||||
|
@ -289,6 +290,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
|
||||
def domain_block
|
||||
return @domain_block if defined?(@domain_block)
|
||||
|
||||
@domain_block = DomainBlock.rule_for(@domain)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue