dovecot-1.1: pop3: Don't assert-crash if sending 2x(USER+PASS) c...

dovecot at dovecot.org dovecot at dovecot.org
Wed Oct 29 18:11:11 EET 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/0c7bfad031d2
changeset: 7977:0c7bfad031d2
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Oct 29 18:11:06 2008 +0200
description:
pop3: Don't assert-crash if sending 2x(USER+PASS) commands within the same IP packet.

diffstat:

1 file changed, 5 insertions(+), 2 deletions(-)
src/pop3-login/client.c |    7 +++++--

diffs (24 lines):

diff -r a5495e3e90c9 -r 0c7bfad031d2 src/pop3-login/client.c
--- a/src/pop3-login/client.c	Wed Oct 29 17:40:25 2008 +0200
+++ b/src/pop3-login/client.c	Wed Oct 29 18:11:06 2008 +0200
@@ -195,15 +195,18 @@ void client_input(struct pop3_client *cl
 {
 	char *line, *args;
 
+	i_assert(!client->common.authenticating);
+
 	timeout_reset(client->to_idle_disconnect);
-
 	if (!client_read(client))
 		return;
 
 	client_ref(client);
 
 	o_stream_cork(client->output);
-	while (!client->output->closed &&
+	/* if a command starts an authentication, stop processing further
+	   commands until the authentication is finished. */
+	while (!client->output->closed && !client->common.authenticating &&
 	       (line = i_stream_next_line(client->input)) != NULL) {
 		args = strchr(line, ' ');
 		if (args != NULL)


More information about the dovecot-cvs mailing list