Handle a BAD response in AUTH PLAIN w/o initial response (#1237)
authorPietro Cerutti <gahr@gahr.ch>
Wed, 30 May 2018 12:44:14 +0000 (13:44 +0100)
committerGitHub <noreply@github.com>
Wed, 30 May 2018 12:44:14 +0000 (13:44 +0100)
commitd187e768dcbd40b5cd8769456324feb5b8d1601b
tree6b3a04fce95d89c400220caceae98ef109ff193e
parent787c3edfe7d16dc6a647879026539ccd4750cfe6
Handle a BAD response in AUTH PLAIN w/o initial response (#1237)

The incorrect assumption was that the first line of an AUTH PLAIN w/o
I-R was always successful, so the client could write the second line and
end up with a readable socket that would be activated by the server
sending the final OK or BAD response.
If however the first line results in a BAD response already, the server
wouldn't write anything else and the client would be left polling for an
additional response that never arrives, effectively hanging the process.

Issue #1236
imap/auth_plain.c