Fix Keybase verification using wrong domain for remote accounts (#10547)

This commit is contained in:
Eugen Rochko
2019-04-10 20:28:43 +02:00
committed by GitHub
parent 793b0513eb
commit a9f130b8d8
6 changed files with 23 additions and 18 deletions

View File

@ -19,9 +19,8 @@ class ProofProvider::Keybase::Worker
end
def perform(proof_id)
proof = proof_id.is_a?(AccountIdentityProof) ? proof_id : AccountIdentityProof.find(proof_id)
verifier = ProofProvider::Keybase::Verifier.new(proof.account.username, proof.provider_username, proof.token)
status = verifier.status
proof = proof_id.is_a?(AccountIdentityProof) ? proof_id : AccountIdentityProof.find(proof_id)
status = proof.provider_instance.verifier.status
# If Keybase thinks the proof is valid, and it exists here in Mastodon,
# then it should be live. Keybase just has to notice that it's here