Browse files

Improve address parser for malformed mailbox specifications

Spammers use "Name <addr> <addr>" to trick some parsers.
My expectations as to what the outcome should be is presented
in the updated mailboxTest.cpp.

The DFA in mailbox::parseImpl is hereby redone so as to pick the
rightmost address-looking portion as the address, rather than
something in between. While doing so, it will also no longer mangle
the name part anymore (it does this by keeping a "as_if_name"
variable around until the end).
  • Loading branch information...
jengelh committed Nov 29, 2018
1 parent cc18aa3 commit d1190b496faa754a757aba79f88dcd7e31d6d500
Showing with 173 additions and 186 deletions.
  1. +167 −180 src/vmime/mailbox.cpp
  2. +6 −6 tests/parser/mailboxTest.cpp
Oops, something went wrong.

0 comments on commit d1190b4

Please sign in to comment.