mirror of
https://github.com/zkemail/zk-email-verify.git
synced 2026-01-09 13:38:03 -05:00
Bug fixes
Fixed a bug in retrieving the DKIM public key: For some emails, the DKIM public key is not stored TXT record directly in `selector._domainkey.domain`, but instead points to a CNAME. For example, when retrieving the DKIM public key for the following domain: `protonmail._domainkey.proton.me`, we first need to resolve the CNAME for this domain: `protonmail.domainkey.drfeyjwh4gwlal4e2rhajsytrp6auv2nhenecpzigu7muak6lw6ya.domains.proton.ch`. However, using the "dns" npm package, the CNAME cannot be resolved. With this update, all DNS resolutions will be performed using google DNS-over-HTTPS (DoH).
This commit is contained in:
@@ -301,11 +301,7 @@ export const getPublicKey = async (
|
||||
resolver: (...args: [name: string, type: string]) => Promise<any>
|
||||
) => {
|
||||
minBitLength = minBitLength || 1024;
|
||||
if (!IS_BROWSER) {
|
||||
resolver = resolver || require("dns").promises.resolve;
|
||||
} else {
|
||||
resolver = resolveDNSHTTP;
|
||||
}
|
||||
resolver = resolveDNSHTTP;
|
||||
|
||||
let list = await resolver(name, "TXT");
|
||||
let rr =
|
||||
|
||||
Reference in New Issue
Block a user