]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
login-common: Fix for infinite recursion on invalid var expansion in login_log_format...
authorMarco Bettini <marco.bettini@open-xchange.com>
Wed, 23 Nov 2022 09:51:39 +0000 (09:51 +0000)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Fri, 25 Nov 2022 13:57:49 +0000 (13:57 +0000)
Broken by 0a3997e1c64f48529338a9f93d7c39381dfe4f72

src/login-common/client-common.c

index 48e7daf0d731f2c110ff9520a6758dea9899ae9d..a6aaaaeb97159996012ef4b6a978bc4bd921aee0 100644 (file)
@@ -1027,8 +1027,7 @@ client_get_log_str(struct client *client, const char *msg)
                    !expand_error_logged) {
                        /* NOTE: Don't log via client->event - it would cause
                           recursion */
-                       e_error(client->event,
-                               "Failed to expand log_format_elements=%s: %s",
+                       i_error("Failed to expand log_format_elements=%s: %s",
                                *e, error);
                        expand_error_logged = TRUE;
                }
@@ -1065,8 +1064,7 @@ client_get_log_str(struct client *client, const char *msg)
        if (var_expand(str, client->set->login_log_format, tab, &error) <= 0) {
                /* NOTE: Don't log via client->event - it would cause
                   recursion */
-               e_error(client->event,
-                       "Failed to expand login_log_format=%s: %s",
+               i_error("Failed to expand login_log_format=%s: %s",
                        client->set->login_log_format, error);
                expand_error_logged = TRUE;
        }