From: Aki Tuomi Date: Thu, 3 Mar 2016 09:53:05 +0000 (+0200) Subject: doveadm-http: Fixed crash when no authentication was configured. X-Git-Tag: 2.2.22.rc1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ab00b5d88b45846cbbef2e475e625d05db755e6a;p=thirdparty%2Fdovecot%2Fcore.git doveadm-http: Fixed crash when no authentication was configured. --- diff --git a/src/doveadm/client-connection-http.c b/src/doveadm/client-connection-http.c index d13dadd4b9..6f7aaa277a 100644 --- a/src/doveadm/client-connection-http.c +++ b/src/doveadm/client-connection-http.c @@ -640,7 +640,7 @@ doveadm_http_server_authorize_request(struct client_connection_http *conn) /* no authentication specified */ if (doveadm_settings->doveadm_api_key[0] == '\0' && *conn->client.set->doveadm_password == '\0') { - http_server_request_fail_close(conn->http_server_request, 500, "Internal Server Error"); + conn->http_response = http_server_response_create(conn->http_server_request, 500, "Internal Server Error"); i_error("No authentication defined in configuration. Add API key or password"); return FALSE; }