dovecot-2.0: auth: Fail if auth client tries to use a duplicate ID.

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 2 23:42:45 EET 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/6c9bc37fcf41
changeset: 12491:6c9bc37fcf41
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Dec 02 21:42:30 2010 +0000
description:
auth: Fail if auth client tries to use a duplicate ID.

diffstat:

 src/auth/auth-request-handler.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 16dbbb57a4b2 -r 6c9bc37fcf41 src/auth/auth-request-handler.c
--- a/src/auth/auth-request-handler.c	Thu Dec 02 21:42:18 2010 +0000
+++ b/src/auth/auth-request-handler.c	Thu Dec 02 21:42:30 2010 +0000
@@ -449,6 +449,12 @@
 		auth_request_unref(&request);
 		return FALSE;
 	}
+	if (hash_table_lookup(handler->requests, POINTER_CAST(id)) != NULL) {
+		i_error("BUG: Authentication client %u "
+			"sent a duplicate ID %u", handler->client_pid, id);
+		auth_request_unref(&request);
+		return FALSE;
+	}
 	auth_request_init(request);
 
 	request->to_abort = timeout_add(MASTER_AUTH_SERVER_TIMEOUT_SECS * 1000,


More information about the dovecot-cvs mailing list