dovecot-1.2: Don't return BAD if ENABLE command is used in pre-a...

dovecot at dovecot.org dovecot at dovecot.org
Sat Jun 21 12:51:45 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/67a2d45e8e95
changeset: 7923:67a2d45e8e95
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Jun 21 10:42:24 2008 +0300
description:
Don't return BAD if ENABLE command is used in pre-auth state. Just ignore it.

diffstat:

1 file changed, 10 insertions(+)
src/imap-login/client.c |   10 ++++++++++

diffs (27 lines):

diff -r 4b4d2a4423ec -r 67a2d45e8e95 src/imap-login/client.c
--- a/src/imap-login/client.c	Sat Jun 21 10:39:45 2008 +0300
+++ b/src/imap-login/client.c	Sat Jun 21 10:42:24 2008 +0300
@@ -269,6 +269,14 @@ static int cmd_logout(struct imap_client
 	return 1;
 }
 
+static int cmd_enable(struct imap_client *client)
+{
+	client_send_line(client, "* ENABLED");
+	client_send_tagline(client,
+			    "OK ENABLE ignored in non-authenticated state.");
+	return 1;
+}
+
 static int client_command_execute(struct imap_client *client, const char *cmd,
 				  const struct imap_arg *args)
 {
@@ -287,6 +295,8 @@ static int client_command_execute(struct
 		return cmd_noop(client);
 	if (strcmp(cmd, "LOGOUT") == 0)
 		return cmd_logout(client);
+	if (strcmp(cmd, "ENABLE") == 0)
+		return cmd_enable(client);
 
 	return -1;
 }


More information about the dovecot-cvs mailing list