]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3: Show APOP challenge only when APOP auth mechanism is enabled.
authorTimo Sirainen <tss@iki.fi>
Thu, 19 Aug 2010 17:28:20 +0000 (18:28 +0100)
committerTimo Sirainen <tss@iki.fi>
Thu, 19 Aug 2010 17:28:20 +0000 (18:28 +0100)
src/pop3-login/client.c

index 1968659d18c884d468c3312524fb1b34bf317ec3..3b78c85682c597a2a4d4fd2eef00771f05203c6c 100644 (file)
@@ -138,6 +138,11 @@ static char *get_apop_challenge(struct pop3_client *client)
        unsigned char buffer_base64[MAX_BASE64_ENCODED_SIZE(sizeof(buffer)) + 1];
        buffer_t buf;
 
+       if (auth_client_find_mech(auth_client, "APOP") == NULL) {
+               /* disabled, no need to present the challenge */
+               return NULL;
+       }
+
        auth_client_get_connect_id(auth_client, &client->apop_server_pid,
                                   &client->apop_connect_uid);