[dovecot-cvs] dovecot/src/pop3-login client-authenticate.c, 1.41,
1.42
cras at dovecot.org
cras at dovecot.org
Tue Feb 1 22:21:46 EET 2005
Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv1757/pop3-login
Modified Files:
client-authenticate.c
Log Message:
Don't advertise USER capability if we're not allowing plaintext
authentication.
Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/client-authenticate.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- client-authenticate.c 12 Jan 2005 12:14:52 -0000 1.41
+++ client-authenticate.c 1 Feb 2005 20:21:43 -0000 1.42
@@ -26,8 +26,14 @@
string_t *str;
str = t_str_new(128);
- str_append(str, "SASL");
+ str_append(str, "+OK\r\n" POP3_CAPABILITY_REPLY);
+
+ if (ssl_initialized && !client->common.tls)
+ str_append(str, "STLS\r\n");
+ if (!disable_plaintext_auth || client->common.secured)
+ str_append(str, "USER\r\n");
+ str_append(str, "SASL");
mech = auth_client_get_available_mechs(auth_client, &count);
for (i = 0; i < count; i++) {
/* a) transport is secured
@@ -41,12 +47,9 @@
str_append(str, mech[i].name);
}
}
+ str_append(str, "\r\n.");
- client_send_line(client,
- t_strconcat("+OK\r\n" POP3_CAPABILITY_REPLY,
- (ssl_initialized && !client->common.tls) ?
- "STLS\r\n" : "",
- str_c(str), "\r\n.", NULL));
+ client_send_line(client, str_c(str));
return TRUE;
}
More information about the dovecot-cvs
mailing list