Skip to content
Snippets Groups Projects
Unverified Commit 96534531 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Guard against nil URLs in Request class (#7284)

Fix #7265
parent 6c40e567
No related branches found
No related tags found
No related merge requests found
......@@ -9,12 +9,15 @@ class Request
include RoutingHelper
def initialize(verb, url, **options)
raise ArgumentError if url.blank?
@verb = verb
@url = Addressable::URI.parse(url).normalize
@options = options.merge(use_proxy? ? Rails.configuration.x.http_client_proxy : { socket_class: Socket })
@headers = {}
raise Mastodon::HostValidationError, 'Instance does not support hidden service connections' if block_hidden_service?
set_common_headers!
set_digest! if options.key?(:body)
end
......
......@@ -4,6 +4,8 @@ class ActivityPub::FetchFeaturedCollectionService < BaseService
include JsonLdHelper
def call(account)
return if account.featured_collection_url.blank?
@account = account
@json = fetch_resource(@account.featured_collection_url, true)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment