Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fetch DNS public key correctly when there's multiple DKIM sig #57

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

richardliang
Copy link
Contributor

  • The current Google DNS fetch script isnt compatible with emails that have >1 DKIM signatures
  • In tools.js, the script previously extracted out.Answer[0].data which assumes that the public key is in the first element in the array
  • For certain domains such as Venmo and Coinbase, there are 2 DKIMs and so 2 elements in the array response. The valid public key is in that second element
  • This PR updates the logic to out.Answer[out.Answer.length - 1].data and got everything to work. Not sure if theres any more edge cases
  • For example this is the diff between twitter fetch and venmo or coinbase

@Divide-By-0 Divide-By-0 merged commit ba64004 into zkemail:main Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants