diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-11-09 08:24:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 08:24:21 +0100 |
commit | e98833748e80275a88560155a0b912667dd2d70b (patch) | |
tree | ec0d8f68e810e95784efb98e1f603bc86cc247cf /app/services | |
parent | 53817294fc95eabfed6129138f9aaa920e13c4b9 (diff) |
Fix being able to spoof link verification (#20217)
- Change verification to happen in `default` queue - Change verification worker to only be queued if there's something to do - Add `link` tags from metadata fields to page header of profiles
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/activitypub/process_account_service.rb | 2 | ||||
-rw-r--r-- | app/services/update_account_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index 3834d79cc..99bcb3835 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -40,7 +40,7 @@ class ActivityPub::ProcessAccountService < BaseService unless @options[:only_key] || @account.suspended? check_featured_collection! if @account.featured_collection_url.present? check_featured_tags_collection! if @json['featuredTags'].present? - check_links! unless @account.fields.empty? + check_links! if @account.fields.any?(&:requires_verification?) end @account diff --git a/app/services/update_account_service.rb b/app/services/update_account_service.rb index 77f794e17..71976ab00 100644 --- a/app/services/update_account_service.rb +++ b/app/services/update_account_service.rb @@ -28,7 +28,7 @@ class UpdateAccountService < BaseService end def check_links(account) - VerifyAccountLinksWorker.perform_async(account.id) + VerifyAccountLinksWorker.perform_async(account.id) if account.fields.any?(&:requires_verification?) end def process_hashtags(account) |