Skip to content

Don't consider substrings when checking distinct mailbox names

Michael Gratton requested to merge wip/491-email-spoofing-case into mainline

RFC822.MailboxAddress.has_distinct_name() really needs to not do sub-string checks since it will cause addresses like "foo-bar@baz" <bar@baz> to not have a distinct name. To keep the fix for #491 (closed) in effect, also adds special case checking for sinlge quotes.

Add some more tests to cover these cases.

Partially reverts commit 6e137eb6

See discussion in !252 (merged)

Merge request reports