]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: If auth fails due to invalid username, send the username in the FAIL message.
authorTimo Sirainen <tss@iki.fi>
Sat, 19 Nov 2011 21:14:59 +0000 (23:14 +0200)
committerTimo Sirainen <tss@iki.fi>
Sat, 19 Nov 2011 21:14:59 +0000 (23:14 +0200)
src/auth/auth-request-handler.c

index b4946c47941c63e11e43001be482fd9d4d6863c8..1eeea57c887a5e77ac4cb96d3beb11312ced7cf0 100644 (file)
@@ -299,6 +299,10 @@ void auth_request_handler_reply(struct auth_request *request,
                auth_stream_reply_add(reply, NULL, dec2str(request->id));
                if (request->user != NULL)
                        auth_stream_reply_add(reply, "user", request->user);
+               else if (request->original_username != NULL) {
+                       auth_stream_reply_add(reply, "user",
+                                             request->original_username);
+               }
 
                if (request->internal_failure)
                        auth_stream_reply_add(reply, "temp", NULL);