Mercurial > dovecot > core-2.2
changeset 9811:211853d48eaf HEAD
*-login: If proxying is enabled but no host is given, don't crash.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 24 Aug 2009 16:55:12 -0400 |
parents | 07e966c5e5d3 |
children | f751c23561f9 |
files | src/login-common/client-common-auth.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/login-common/client-common-auth.c Mon Aug 24 16:44:03 2009 -0400 +++ b/src/login-common/client-common-auth.c Mon Aug 24 16:55:12 2009 -0400 @@ -267,6 +267,12 @@ PROXY_FAILURE_MSG); return -1; } + if (reply->host == NULL || *reply->host == '\0') { + client_log_err(client, "proxy: host not given"); + client_send_line(client, CLIENT_CMD_REPLY_AUTH_FAIL_TEMP, + PROXY_FAILURE_MSG); + return -1; + } i_assert(client->refcount > 1);