]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: acme: prevent creating map entries with dns-01
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 21 Nov 2025 11:25:42 +0000 (12:25 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 21 Nov 2025 11:28:41 +0000 (12:28 +0100)
We don't need map entries with dns-01.

The patch must be backported to 3.2.

src/acme.c

index 787f3612eddd5bbd0f1fb7172c82a446cf487a1d..1383b71695757ef92e7ca2646aa0117a4a97ba29 100644 (file)
@@ -1752,12 +1752,12 @@ int acme_res_auth(struct task *task, struct acme_ctx *ctx, struct acme_auth *aut
                        dpapi = sink_find("dpapi");
                        if (dpapi)
                                sink_write(dpapi, LOG_HEADER_NONE, 0, line, nmsg);
-               }
-
-               /* only useful for http-01 */
-               if (acme_add_challenge_map(ctx->cfg->map, auth->token.ptr, ctx->cfg->account.thumbprint, errmsg) != 0) {
-                       memprintf(errmsg, "couldn't add the token to the '%s' map: %s", ctx->cfg->map, *errmsg);
-                       goto error;
+               } else {
+                       /* only useful for http-01 */
+                       if (acme_add_challenge_map(ctx->cfg->map, auth->token.ptr, ctx->cfg->account.thumbprint, errmsg) != 0) {
+                               memprintf(errmsg, "couldn't add the token to the '%s' map: %s", ctx->cfg->map, *errmsg);
+                               goto error;
+                       }
                }
 
                /* we only need one challenge, and iteration is only used to found the right one */