From 04b7dc631f33bf61f273138c679da9bd0910fb6d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 24 Aug 2009 16:55:12 -0400 Subject: [PATCH] *-login: If proxying is enabled but no host is given, don't crash. --HG-- branch : HEAD --- src/login-common/client-common-auth.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.47.3