From 95fe20b78ada8612108f8e44294cc36fdaf9cef8 Mon Sep 17 00:00:00 2001 From: ThibG Date: Fri, 13 Oct 2017 12:58:13 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20remote=20status=20fetching=20for=20?= =?UTF-8?q?=E2=80=9Cpure=E2=80=9D=20ActivityPub=20WEB=5FACCOUNT=20users=20?= =?UTF-8?q?(#5372)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remote ActivityPub users that have never been known as OStatus users (whether or not they support it) will not have a “remote_url” attribute set. In case they reside on an instance with WEB_DOMAIN ≠ LOCAL_DOMAIN, the current check did rely on “remote_url” to verify the user's domain. --- app/services/fetch_remote_status_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/fetch_remote_status_service.rb b/app/services/fetch_remote_status_service.rb index cacf6ba513..9c009335b6 100644 --- a/app/services/fetch_remote_status_service.rb +++ b/app/services/fetch_remote_status_service.rb @@ -40,6 +40,6 @@ class FetchRemoteStatusService < BaseService end def confirmed_domain?(domain, account) - account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url).normalized_host).zero? + account.domain.nil? || domain.casecmp(account.domain).zero? || domain.casecmp(Addressable::URI.parse(account.remote_url || account.uri).normalized_host).zero? end end