Subject: | Mail::DKIM::Signer::headers() should add space around ":" to avoid header encoding due to line-length limits |
According to RFC 4871:
h= Signed header fields (plain-text, but see description; REQUIRED).
A colon-separated list of header field names that identify the
header fields presented to the signing algorithm. The field MUST
contain the complete list of header fields in the order presented
to the signing algorithm. The field MAY contain names of header
fields that do not exist when signed; nonexistent header fields
do not contribute to the signature computation (that is, they are
treated as the null input, including the header field name, the
separating colon, the header field value, and any CRLF
terminator). The field MUST NOT include the DKIM-Signature
header field that is being created or verified, but may include
others. Folding whitespace (FWS) MAY be included on either side
of the colon separator. Header field names MUST be compared
against actual header field names in a case-insensitive manner.
This list MUST NOT be empty. See Section 5.4 for a discussion of
choosing header fields to sign.
"olding whitespace (FWS) MAY be included on either side of the colon
separator. "
--- lib/Mail/DKIM/Signer.pm 2010-02-19 11:51:50.000000000 -0800
+++ lib/Mail/DKIM/Signer.pm.new 2010-02-19 11:52:53.000000000 -0800
@@ -436,7 +436,7 @@
grep { my $a = $_;
scalar grep { lc($a) eq lc($_) } @wanted_headers }
@found_headers;
- return join(":", @headers);
+ return join(" : ", @headers);
}