-
-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DKIM relaxed body canonicalization #190
Comments
This should be fixed now |
I've released MimeKit 1.2.16 to NuGet with a fix for this. |
Thanks! Unfortunately, in some cases the body hash is still not correct. By adding an extra condition it seems to work. Old code: if (*inptr == (byte)'\r' && (inptr + 1) < inend && *(inptr + 1) == (byte)'\n') New code: if (*inptr == (byte)'\r' && (inptr + 1) == inend)
{
if (!IsEmptyLine)
{
*outptr++ = *inptr;
lwsp = false;
count++;
}
}
else if (*inptr == (byte)'\r' && (inptr + 1) < inend && *(inptr + 1) == (byte)'\n') |
is your message body ending with a \r? |
never mind, this can happen if the \r\n is split across buffer boundaries. |
This should now be fixed in git master. |
Thanks, the fix in git master works! |
ok, I'll probably try to make another release this weekend then. |
I've published 1.3.0-beta (I had to publish a beta because I've added dnxcore50 support which requires beta packages), so you can either install that nuget or a "hidden" MimeKit 1.2.17.2 nuget which is the same thing, but contains an incomplete list of dnxcore50 dependencies to get around needing to mark it as a beta. |
I just published a non-hidden 1.2.17.3 nuget with this fix so you don't have to tell VS to allow pre-release nugets. |
DKIM relaxed body canonicalization must "Ignore all whitespace at the end of lines. Implementations MUST NOT remove the CRLF at the end of the line.". This doesn't work anymore since commit 71abff2
Body test case:
test[CR][LF]
[SP][CR][LF]
test[CR][LF]
This must be canonicalized to:
test[CR][LF]
[CR][LF]
test[CR][LF]
The text was updated successfully, but these errors were encountered: