Dovecot sends "OK Logged in" with empty tag
Simon Thelen
foss-ml at c-14.de
Mon Aug 10 16:19:57 UTC 2015
On 15-07-31 at 22:37, Simon Thelen wrote:
> Hello,
>
> I'm currently writing my own IMAP client and testing it against Dovecot,
> and when doing PLAIN AUTH Dovecot sends the "OK Logged in" with an empty
> tag at the start. I tried reproducing the conversation with netcat, but
> Dovecot sends a correctly tagged OK at the end of the AUTH so I assume
> it's timing related.
I ended up finding the issue and thought I'd report the fix here. When
sending the CAPABILITY command directly after receiving the untagged OK
during PREGREET, I sent a trailing '\0' after the '\r\n'. This then
presumably messed up the tokenizer in dovecot causing it to think that
the tag for the AUTHENTICATE command was "". I can't find a spot in the
RFC that states what a server should do if it receives a bad tag, so I
don't know if dovecot handles it correctly but in any case this was a
bug on my part. Sorry for the noise.
--
Simon Thelen
More information about the dovecot
mailing list