Dovecot sends "OK Logged in" with empty tag
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've attached pcap dumps of the TCP conversation in both situations as well as the output of dovecot -n.
Side Note:
Why does Dovecot send the updated capabilities before OK'ing the authentication? Seems strange to me as the client can't assume that the authentication proceeded successfully until it actually receives the OK so it has to assume that those capabilities are pre login.
-- Simon Thelen
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
On 15-07-31 at 22:37, Simon Thelen wrote: 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
participants (1)
-
Simon Thelen