mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-10-29 15:02:30 +00:00
0b0e520692
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.