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

Misrepresentation of whitespace #43

Closed
Afwas opened this issue Mar 19, 2015 · 2 comments
Closed

Misrepresentation of whitespace #43

Afwas opened this issue Mar 19, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@Afwas
Copy link

Afwas commented Mar 19, 2015

Emails sent to myself get an error: Invalid (Copied header fields tag ill-formed)
Investigating I foud this DEBUG in console:

DKIM_Verifier.Verifier  WARN DKIM_SIGERROR_ILLFORMED_Z: DKIM Signature Error: Copied header fields tag ill-formed (resource://dkim_verifier/helper.jsm:5) JS Stack trace: parseTagValue@dkimVerifier.jsm:329:5 < parseDKIMSignature@dkimVerifier.jsm:636:7 < processSignatures@dkimVerifier.jsm:1133:5 < Verifier_verify2@dkimVerifier.jsm:1320:7 < _authVerifier_verify/promise<@AuthVerifier.jsm:107:9

So it's the z= tag. Removing my personal information the z= tag from this email looks like

z=From:=20foo@example.comt|To:=20bar@example.net|Subject:=20Het=2 0weer=20te=20Garnwerd=20in=20de=20maand=20maart=202015|Date:=20Thu ,=2019=20Mar=202015=2004:36:33=20+0100=20(CET); 

Examining the code with help from the backtrace from the DEBUG information I think the bug could be in the pattWSP regexp [ \t] in dkimVerifier.jsm:101 which is misrepresenting the whitespace in the z= tag becasue the space in the z= tag is converted to =20 which is the Unicode cahracter value of the space \u0020.

But I might be wrong ;)

@lieser lieser self-assigned this Mar 19, 2015
@lieser
Copy link
Owner

lieser commented Mar 19, 2015

The problem is the space in the encoded space =20 which is not allowed
( ... |Subject:=20Het=2 0weer=20te=20 ...).
If I remove it the add-on no longer gives this error.
So this seems not to be an error in the add-on, but a problem at the signer or in the transport

@lieser lieser closed this as completed Mar 19, 2015
@lieser lieser added the invalid label Mar 19, 2015
@lieser
Copy link
Owner

lieser commented Oct 6, 2016

I had a second lock at the RFC, and came to the conclusion that I was probably wrong. As long as it was not just a space, but a folding whitespace (multiple lines separated by CRLF followed by at least one whitespace) it is probably allowed.
The behavior of the add-on will be changed in version 1.6.2.

@lieser lieser added bug and removed invalid labels Oct 6, 2016
@lieser lieser added this to the 1.6.2 milestone Oct 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants