Please sign in to comment.
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...
Showing with 173 additions and 186 deletions.
Oops, something went wrong.