public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH] proxmox-acme: fix DNS plugin configuration parsing
@ 2026-09-13 10:24 Saeed Parhizkary
  0 siblings, 0 replies; only message in thread
From: Saeed Parhizkary @ 2026-09-13 10:24 UTC (permalink / raw)
  To: pve-devel; +Cc: Saeed Parhizkary

The DNS plugin configuration parser currently splits each configuration
line at the first '=' using shell word splitting. This causes values
containing '=' to be truncated.

Parse the key with ${line%%=*} and the value with ${line#*=} instead,
so everything after the first '=' is preserved.

This is required for DNS API credentials whose values may contain '='.

Signed-off-by: Saeed Parhizkary <saeed.parhizkary@gmail.com>
---
 src/proxmox-acme | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/proxmox-acme b/src/proxmox-acme
index 705f7df..2160ca6 100644
--- a/src/proxmox-acme
+++ b/src/proxmox-acme
@@ -924,14 +924,12 @@ _json_decode() {
 # Proxmox implementation to inject the DNSAPI variables
 _load_plugin_config() {
     while IFS= read -r line; do
-	ADDR=(${line/=/ })
-	key="${ADDR[0]}"
-	value="${ADDR[1]}"
-
-	# acme.sh uses eval insted of export
-	if [ -n "$key" ]; then
-	    export "$key"="$value"
-	fi
+        key="${line%%=*}"
+        value="${line#*=}"
+
+        if [ -n "$key" ]; then
+            export "$key=$value"
+        fi
     done
 }
 
-- 
2.47.3




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-14  7:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 10:24 [PATCH] proxmox-acme: fix DNS plugin configuration parsing Saeed Parhizkary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal