Mercurial > dovecot > core-2.2
changeset 12491:6c9bc37fcf41
auth: Fail if auth client tries to use a duplicate ID.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 02 Dec 2010 21:42:30 +0000 |
parents | 16dbbb57a4b2 |
children | 8e30a07d8dd0 |
files | src/auth/auth-request-handler.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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,