From: Timo Sirainen Date: Mon, 24 Aug 2009 20:55:12 +0000 (-0400) Subject: *-login: If proxying is enabled but no host is given, don't crash. X-Git-Tag: 2.0.alpha1~241 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04b7dc631f33bf61f273138c679da9bd0910fb6d;p=thirdparty%2Fdovecot%2Fcore.git *-login: If proxying is enabled but no host is given, don't crash. --HG-- branch : HEAD --- diff --git a/src/login-common/client-common-auth.c b/src/login-common/client-common-auth.c index 90425254d8..7673e52021 100644 --- a/src/login-common/client-common-auth.c +++ b/src/login-common/client-common-auth.c @@ -267,6 +267,12 @@ static int proxy_start(struct client *client, 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);