Opened 8 years ago

#6021 defect new

IMAP4Client.authenticate returns a Deferred which fails with ConnectionDone instead of a relevant exception

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: mail Keywords:
Cc: Branch:


When the server sends non-base64 data as an authentication challenge, IMAP4Client drops its connection, logs the base64 decoding error, and fires the Deferred returned by authenticate with its connectionLost reason.

It's probably reasonably correct to close the connection, but instead of ConnectionDone, it should fire that Deferred with the base64 decoding exception and it should not log it.

The general principle here is that logging exceptions is a last resort and you only do it if you don't have anywhere else to send them. There is an obvious place to send them in this case: the Deferred returned by authenticate.

See #3751.

Change History (0)

Note: See TracTickets for help on using tickets.