]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Improve logging internal failure errors for proxy reauth
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 10 Mar 2026 19:05:48 +0000 (21:05 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 12 Mar 2026 14:59:51 +0000 (14:59 +0000)
src/login-common/client-common-auth.c

index d3623a99416a2f716bfde52a32b50c1cfd4b67a0..c1bfe8b24de0b31265e7e6d0cf3b55a545b063a0 100644 (file)
@@ -389,7 +389,7 @@ static void proxy_reset(struct client *client)
 static void
 proxy_redirect_reauth_callback(struct auth_client_request *request,
                               enum auth_request_status status,
-                              const char *log_error ATTR_UNUSED,
+                              const char *log_error,
                               const char *data_base64 ATTR_UNUSED,
                               const char *const *args, void *context)
 {
@@ -438,18 +438,16 @@ proxy_redirect_reauth_callback(struct auth_client_request *request,
                error = "Redirect authentication is missing proxy or nologin field";
                break;
        case AUTH_REQUEST_STATUS_INTERNAL_FAIL:
-               error = "Internal authentication failure";
+               error = log_error;
                break;
        case AUTH_REQUEST_STATUS_FAIL:
                if (!client_auth_parse_args(client, FALSE, TRUE, args,
                                            &reply, &username))
                        error = "Failed to parse auth reply";
-               else if (reply.reason == NULL || reply.reason[0] == '\0')
-                       error = "Redirect authentication unexpectedly failed";
                else
                        error = t_strdup_printf(
                                "Redirect authentication unexpectedly failed: %s",
-                               reply.reason);
+                               log_error);
                break;
        case AUTH_REQUEST_STATUS_ABORT:
                if (client->login_proxy == NULL)