From: Stephan Bosch Date: Fri, 9 Aug 2019 22:33:21 +0000 (+0200) Subject: login-common: Fix sending locally-generated authentication error reason to client. X-Git-Tag: 2.3.9~332 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cae45ed02f6a16e3368bf67fc55a7ab65e7bbae;p=thirdparty%2Fdovecot%2Fcore.git login-common: Fix sending locally-generated authentication error reason to client. This is about authentication errors that emerge at the login service rather than the auth service. The error reason was always substituted with an unhelpful "Authentication failed", while e.g. an error like "Unsupported authentication mechanism" was supposed to be sent instead. --- diff --git a/src/login-common/client-common-auth.c b/src/login-common/client-common-auth.c index 4992c73d11..72555e1afd 100644 --- a/src/login-common/client-common-auth.c +++ b/src/login-common/client-common-auth.c @@ -694,6 +694,8 @@ sasl_callback(struct client *client, enum sasl_server_reply sasl_reply, timeout_remove(&client->to_auth_waiting); if (args != NULL) { client_auth_parse_args(client, FALSE, args, &reply); + if (reply.reason == NULL) + reply.reason = data; client->last_auth_fail = reply.fail_code; reply.nologin = TRUE; reply.all_fields = args;