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
This commit is contained in:
parent
53817294fc
commit
e98833748e
7 changed files with 211 additions and 48 deletions
|
@ -3,14 +3,13 @@
|
|||
class VerifyAccountLinksWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options queue: 'pull', retry: false, lock: :until_executed
|
||||
sidekiq_options queue: 'default', retry: false, lock: :until_executed
|
||||
|
||||
def perform(account_id)
|
||||
account = Account.find(account_id)
|
||||
|
||||
account.fields.each do |field|
|
||||
next unless !field.verified? && field.verifiable?
|
||||
VerifyLinkService.new.call(field)
|
||||
VerifyLinkService.new.call(field) if field.requires_verification?
|
||||
end
|
||||
|
||||
account.save! if account.changed?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue