]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth_debug_passwords: Include the password when logging about "Requested x
authorTimo Sirainen <tss@iki.fi>
Mon, 2 Jun 2008 23:46:32 +0000 (02:46 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 2 Jun 2008 23:46:32 +0000 (02:46 +0300)
scheme, but we have only y".

--HG--
branch : HEAD

src/auth/passdb.c

index 8ea4b56c890c549e3609c4e81253f3a511466797..9deb15ae537243a7f54d9a33e96ed0466729262b 100644 (file)
@@ -78,9 +78,15 @@ bool passdb_get_credentials(struct auth_request *auth_request,
 
        if (!password_scheme_is_alias(input_scheme, wanted_scheme)) {
                if (!password_scheme_is_alias(input_scheme, "PLAIN")) {
-                       auth_request_log_info(auth_request, "password",
+                       const char *error = t_strdup_printf(
                                "Requested %s scheme, but we have only %s",
                                wanted_scheme, input_scheme);
+                       if (auth_request->auth->verbose_debug_passwords) {
+                               error = t_strdup_printf("%s (input: %s)",
+                                                       error, input);
+                       }
+                       auth_request_log_info(auth_request, "password",
+                                             "%s", error);
                        return FALSE;
                }