jhermsmeier / node-dkim

DomainKeys Identified Mail
MIT License
10 stars 11 forks source link

Fix canonicalization to correctly work for MS Outlook #9

Closed SmallhillCZ closed 5 years ago

SmallhillCZ commented 5 years ago

Outlook places a semicolon at the end of the DKIM-Signature value, thus when replacing everything after b= till the end of the line, the signature becomes invalid.

Regexp is eager - in case of semicolon everything till semicolon is replaced and in case of no semicolon everything till the end is replaced, therefore IMHO no need for the trailing $.

Been banging my head the whole day today why my mails aren't DKIM verified ;)

jhermsmeier commented 5 years ago

Hi @SmallhillCZ, thanks! Can you add a test for this with a sample from Outlook?

SmallhillCZ commented 5 years ago

I will try, but right now I am not at my computer.

On Thu, Aug 1, 2019, 16:09 Jonas Hermsmeier notifications@github.com wrote:

Hi @SmallhillCZ https://github.com/SmallhillCZ, thanks! Can you add a test for this with a sample from Outlook?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhermsmeier/node-dkim/pull/9?email_source=notifications&email_token=AAJXACN7PURO6IMZXNJHSQ3QCLVC5A5CNFSM4IIQDB4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3KXAUA#issuecomment-517304400, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJXACKO7NTWGAWJHIPRVULQCLVC5ANCNFSM4IIQDB4A .

jhermsmeier commented 5 years ago

No worries – there's no rush, I'd just like to prevent breaking it again in the future :)

jhermsmeier commented 5 years ago

@SmallhillCZ published in dkim@0.5.0 – thanks again!