From e7880953de6acad22f7916cfdee6bda97978eb45 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 6 May 2020 16:52:24 +0300 Subject: [PATCH] imap-login: Don't use proxy_password for checking if authentication is still needed Required for the next commit. --- src/imap-login/imap-proxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/imap-login/imap-proxy.c b/src/imap-login/imap-proxy.c index e6bc7af366..c0951f02fe 100644 --- a/src/imap-login/imap-proxy.c +++ b/src/imap-login/imap-proxy.c @@ -402,7 +402,9 @@ int imap_proxy_parse_line(struct client *client, const char *line) imap_client->proxy_sent_state &= ~IMAP_PROXY_SENT_STATE_CAPABILITY; imap_client->proxy_rcvd_state = IMAP_PROXY_RCVD_STATE_CAPABILITY; if (str_begins(line, "C OK ") && - client->proxy_password != NULL) { + HAS_NO_BITS(imap_client->proxy_sent_state, + IMAP_PROXY_SENT_STATE_AUTHENTICATE | + IMAP_PROXY_SENT_STATE_LOGIN)) { /* pipelining was disabled, send the login now. */ str = t_str_new(128); if (proxy_write_login(imap_client, str) < 0) -- 2.47.3