diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-01-14 18:40:50 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-01-14 18:40:50 +0000 |
commit | fc6fb551537b5af8988576071ff6e1240cff269f (patch) | |
tree | 170221027a964b2bd83206b8f65c03d71d318b5c | |
parent | ff0592132f7e1f9b871a1afb4aa23da96dc189f8 (diff) |
DKIM: DNS records having no v= tag are acceptable. Bug 2207
Broken-by c73a4d073e
-rw-r--r-- | src/src/dkim.c | 3 | ||||
-rw-r--r-- | src/src/pdkim/pdkim.c | 3 |
2 files changed, 4 insertions, 2 deletions
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"); |