Skip to content
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 #172

Closed
breedbekkikker opened this issue Sep 3, 2015 · 2 comments
Closed

DKIM relaxed body canonicalization #172

breedbekkikker opened this issue Sep 3, 2015 · 2 comments
Labels
bug Something isn't working

Comments

@breedbekkikker
Copy link

DKIM body hash validation with relaxed canonicalization fails if:

  • the original body has WSP before CRLF (excluding the last line), or
  • the original body has multiple sequences of WSP within a line, or
  • the original body is non-empty and ends with multiple CRLF

See https://tools.ietf.org/html/rfc6376#section-3.4.4

This can be tested easily by modifying the gmail.msg test data file.

jstedfast added a commit that referenced this issue Sep 3, 2015
@jstedfast
Copy link
Owner

According to my unit tests, the relaxed body canonicalization logic is correct.

jstedfast added a commit that referenced this issue Sep 3, 2015
The filtered stream is what canonicalizes the input.

Fixes issue #172
@jstedfast jstedfast added the bug Something isn't working label Sep 3, 2015
@jstedfast
Copy link
Owner

Never mind, the problem was not the canonicalization logic, but rather that the logic to push the data through the canonicalization filter was bypassing the filter and writing directly to the hash stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants