]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap-login: Don't use proxy_password for checking if authentication is still needed
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Wed, 6 May 2020 13:52:24 +0000 (16:52 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 25 May 2020 08:38:55 +0000 (08:38 +0000)
Required for the next commit.

src/imap-login/imap-proxy.c

index e6bc7af3665d2538f725b6ccd0c6f3cbbb645987..c0951f02fe00df9d072448a2bcb1c2e21d2054fd 100644 (file)
@@ -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)