From: Jeremy Harris Date: Tue, 5 Feb 2019 23:19:00 +0000 (+0000) Subject: DKIM: ensure that dkim_domain elements are lowercased before use. Bug 2371 X-Git-Tag: exim-4.93-RC0~284^2~7 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f3c73adaa541ae54092467a29668ac32894ef1dc;p=exim.git DKIM: ensure that dkim_domain elements are lowercased before use. Bug 2371 --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 6b4f8dace..cea0bbc44 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -39431,7 +39431,7 @@ senders). .cindex "DKIM" "signing" For signing to be usable you must have published a DKIM record in DNS. -Note that RFC 8301 says: +Note that RFC 8301 (which does not cover EC keys) says: .code rsa-sha1 MUST NOT be used for signing or verifying. @@ -39451,7 +39451,11 @@ These options take (expandable) strings as arguments. .option dkim_domain smtp string list&!! unset The domain(s) you want to sign with. After expansion, this can be a list. -Each element in turn is put into the &%$dkim_domain%& expansion variable +Each element in turn, +.new +lowercased, +.wen +is put into the &%$dkim_domain%& expansion variable while expanding the remaining signing options. If it is empty after expansion, DKIM signing is not done, and no error will result even if &%dkim_strict%& is set. @@ -39656,6 +39660,14 @@ dkim_verify_signers = $sender_address_domain:$dkim_signers If a domain or identity is listed several times in the (expanded) value of &%dkim_verify_signers%&, the ACL is only called once for that domain or identity. +.new +Note that if the option is set using untrustworthy data +(such as the From: header) +care should be taken to force lowercase for domains +and for the domain part if identities. +The default setting can be regarded as trustworthy in this respect. +.wen + If multiple signatures match a domain (or identity), the ACL is called once for each matching signature. diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 800cfaf57..d5984e7b2 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -20,6 +20,8 @@ JH/03 Debug output for ACL now gives the config file name and line number for JH/04 The default received_header_text now uses the RFC 8314 tls cipher clause. +JH/05 DKIM: ensure that dkim_domain elements are lowercased before use. + Exim version 4.92 ----------------- diff --git a/src/src/dkim.c b/src/src/dkim.c index a0becd45b..96d7eba81 100644 --- a/src/src/dkim.c +++ b/src/src/dkim.c @@ -620,6 +620,7 @@ if (dkim_domain) /* Only sign once for each domain, no matter how often it appears in the expanded list. */ + dkim_signing_domain = string_copylc(dkim_signing_domain); if (match_isinlist(dkim_signing_domain, CUSS &seen_doms, 0, NULL, NULL, MCL_STRING, TRUE, NULL) == OK) continue;