]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
*-login: If proxying is enabled but no host is given, don't crash.
authorTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2009 20:55:12 +0000 (16:55 -0400)
committerTimo Sirainen <tss@iki.fi>
Mon, 24 Aug 2009 20:55:12 +0000 (16:55 -0400)
--HG--
branch : HEAD

src/login-common/client-common-auth.c

index 90425254d8075af08bd633e302655b76a557d4d6..7673e520219f48b701f8b5e266ddce01a088bdb3 100644 (file)
@@ -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);