From: Jeremy Harris Date: Sun, 14 Jan 2018 18:40:50 +0000 (+0000) Subject: DKIM: DNS records having no v= tag are acceptable. Bug 2207 X-Git-Tag: exim-4_91_RC1~104 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=fc6fb551537b5af8988576071ff6e1240cff269f;p=exim.git DKIM: DNS records having no v= tag are acceptable. Bug 2207 Broken-by c73a4d073e --- diff --git a/src/src/dkim.c b/src/src/dkim.c index 8c03d48ce..852ae17f3 100644 --- a/src/src/dkim.c +++ b/src/src/dkim.c @@ -75,7 +75,8 @@ for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS); } /* check if this looks like a DKIM record */ - if (strncasecmp(answer, "v=dkim", 6) != 0) continue; + if (strncmp(answer, "v=", 2) == 0 && strncasecmp(answer, "v=dkim", 6) != 0) + continue; return PDKIM_OK; } diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index b884671da..186258a62 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -654,7 +654,8 @@ while ((ele = string_nextinlist(&raw_record, &sep, NULL, 0))) } /* Set fallback defaults */ -if (!pub->version ) pub->version = string_copy(PDKIM_PUB_RECORD_VERSION); +if (!pub->version) + pub->version = string_copy(PDKIM_PUB_RECORD_VERSION); else if (Ustrcmp(pub->version, PDKIM_PUB_RECORD_VERSION) != 0) { DEBUG(D_acl) debug_printf(" Bad v= field\n");