From 1046d6c821c1b041bf42c045723af819ff467414 Mon Sep 17 00:00:00 2001 From: Vincent Le Goff Date: Tue, 8 Aug 2023 07:38:10 +0200 Subject: [PATCH] fix(acme): correctly concat returned error (#11364) In the last change we added string concatenation the wrong way leading to empty logs. This addresses the problem (cherry picked from commit 60b4312276a0c15052daac6e826418cae6091997) --- CHANGELOG.md | 2 ++ kong/plugins/acme/client.lua | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16d7986f35e3..4dab29b59f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -127,6 +127,8 @@ [#10559](https://github.com/Kong/kong/pull/10559) - **Zipkin**: Fixed an issue that traces not being generated correctly when instrumentations are enabled. [#10983](https://github.com/Kong/kong/pull/10983) +- **Acme**: Fixed string concatenation on cert renewal errors + [#11364](https://github.com/Kong/kong/pull/11364) #### PDK diff --git a/kong/plugins/acme/client.lua b/kong/plugins/acme/client.lua index 37125746184a..eed2dabf8429 100644 --- a/kong/plugins/acme/client.lua +++ b/kong/plugins/acme/client.lua @@ -163,7 +163,8 @@ local function order(acme_client, host, key, cert_type, rsa_key_size) local cert, err = acme_client:order_certificate(key, host) if err then - return nil, nil, "could not create certificate for host: ", host, " err: " .. err + local concatErr = "could not create certificate for host: " .. host .. " err: " .. err + return nil, nil, concatErr end return cert, key, nil