From d33bc06dc05fc0779488d89acdb34ac003d11d47 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 29 Aug 2021 16:52:10 +0200 Subject: Fix IMAP protocol confusion on 2nd and subsequent polls. This is because driver.c fails to initialize stage to STAGE_GETAUTH soon enough, and on 2nd and subsequent polls it is still STAGE_LOGOUT, and the IMAP parser does not look for the CAPABILITIES outside STAGE_GETAUTH. Reported by: Stefan Esser --- driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver.c b/driver.c index 78e72df6..41cf4e0d 100644 --- a/driver.c +++ b/driver.c @@ -866,6 +866,7 @@ static int do_session( SIGHANDLERTYPE alrmsave; ctl->server.base_protocol = proto; + stage = STAGE_GETAUTH; msgsizes = NULL; pass = 0; @@ -1159,7 +1160,6 @@ static int do_session( goto cleanUp; /* try to get authorized to fetch mail */ - stage = STAGE_GETAUTH; if (ctl->server.base_protocol->getauth) { set_timeout(mytimeout); -- cgit v1.2.3