all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Saeed Parhizkary <saeed.parhizkary@gmail.com>
To: pve-devel@lists.proxmox.com
Cc: Saeed Parhizkary <saeed.parhizkary@gmail.com>
Subject: [PATCH] proxmox-acme: fix DNS plugin configuration parsing
Date: Sun, 13 Sep 2026 13:54:55 +0330	[thread overview]
Message-ID: <20260913102455.23235-1-saeed.parhizkary@gmail.com> (raw)

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




                 reply	other threads:[~2026-09-14  7:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260913102455.23235-1-saeed.parhizkary@gmail.com \
    --to=saeed.parhizkary@gmail.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal