1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-11-04 16:02:29 +00:00

3 Commits

Author SHA1 Message Date
Alberto Bertogli 0b0e520692 dkim: Make b= tag stripping more precise
When verifying a signature we need to strip the value of the b= tag.

Today, we do this with a regexp that can accidentally match other tag
values. For example, "z=Subject:club=20".

This can cause valid emails to fail verification. But it can't cause an
invalid email to pass verification, so it's not a significant security
concern.

To fix this, this patch updates the regular expression to match the tag
more precisely. It also adds a few tests to validate the behaviour is
correct, which were cross-checked with other implementations.

Thanks to John JEAN <john@wargan.com> for reporting this bug.
2026-10-14 20:16:03 +01:00
Alberto Bertogli 1a1befc75a dkim: Update .gitignore pattern for private test cases
The current .gitignore pattern doesn't work when the private test cases
are a symlink, which can be convenient.

This patch fixes it by changing the pattern to match symlinks as well as
directories.
2024-04-21 11:08:08 +01:00
Alberto Bertogli 76a72367ae dkim: Implement internal dkim signing and verification
This patch implements internal DKIM signing and verification.
2024-03-12 20:43:21 +00:00