From 77cd58545d54a5d5b863dc13990b0b8a7d2d6979 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Thu, 22 Dec 2016 23:17:57 +0100 Subject: [PATCH] Re-enable Webfinger for locked accounts but don't handle "follow" events coming in via Salmon. Currently no way to prevent remote follows, but they will only receive public and unlisted posts --- app/controllers/xrd_controller.rb | 2 +- app/services/process_interaction_service.rb | 2 +- config/locales/simple_form.en.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/xrd_controller.rb b/app/controllers/xrd_controller.rb index c3c38063c1..9e02778607 100644 --- a/app/controllers/xrd_controller.rb +++ b/app/controllers/xrd_controller.rb @@ -13,7 +13,7 @@ class XrdController < ApplicationController end def webfinger - @account = Account.where(locked: false).find_local!(username_from_resource) + @account = Account.find_local!(username_from_resource) @canonical_account_uri = "acct:#{@account.username}@#{Rails.configuration.x.local_domain}" @magic_key = pem_to_magic_key(@account.keypair.public_key) diff --git a/app/services/process_interaction_service.rb b/app/services/process_interaction_service.rb index 4e54876819..3d3cccb6a9 100644 --- a/app/services/process_interaction_service.rb +++ b/app/services/process_interaction_service.rb @@ -30,7 +30,7 @@ class ProcessInteractionService < BaseService case verb(xml) when :follow - follow!(account, target_account) + follow!(account, target_account) unless target_account.locked? when :unfollow unfollow!(account, target_account) when :favorite diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index deecff3fd8..376c72e127 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -26,7 +26,7 @@ en: reblog: Send e-mail when someone reblogs your status hints: defaults: - locked: Requires you to approve followers, defaults post privacy to followers-only and disables federation + locked: Requires you to approve followers and defaults post privacy to followers-only 'no': 'No' required: mark: "*"