about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2017-10-13 12:58:13 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-10-13 12:58:13 +0200
commit95fe20b78ada8612108f8e44294cc36fdaf9cef8 (patch)
treeee7981f1da2e833872ccc97524381e187ea3bfa6 /app/services
parent3283868e28794d7abe217c525aadf5e7b9e2fa66 (diff)
Fix remote status fetching for “pure” ActivityPub WEB_ACCOUNT users (#5372)
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.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/fetch_remote_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/fetch_remote_status_service.rb b/app/services/fetch_remote_status_service.rb
index cacf6ba51..9c009335b 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