The proposal to merge lp:~jcsackett/launchpad/email-authentication-type-error into lp:launchpad has been updated.
Description changed to: Summary ======= authenticateEmail crashes on bad email address (e.g. ones that are not pure unicode but also not US-ASCII). While we can't process them, we shouldn't crash either. The better approach is to simply proceed without having been able to authenticate, and set an anauthenticated principal as we do with unknown emails. Implementation ============== The call in `authenticateEmail` to `getPrincipalByLogin` is now in a try/except block, which handles `TypeError` by setting principal to None. A principal of None is a case which the rest of the code already handles gracefully. Tests ===== bin/test -vvct test_badly_formed_email QA == Using testemail.py (Curtis Hovey's script), contrive an email that has the right properties, and ensure it doesn't cause an OOPS. LoC === I have approx 400 LoC credit. Lint ==== Checking for conflicts and issues in changed files. Linting changed files: lib/lp/services/mail/incoming.py lib/lp/services/mail/tests/test_incoming.py For more details, see: https://code.launchpad.net/~jcsackett/launchpad/email-authentication-type-error/+merge/131282 -- https://code.launchpad.net/~jcsackett/launchpad/email-authentication-type-error/+merge/131282 Your team Launchpad code reviewers is subscribed to branch lp:launchpad. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

