From f696e885c0d523a2511e2c61993c874ae83521e7 Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Fri, 2 Oct 2026 16:57:43 +0200 Subject: [PATCH] fix #7155: proxmox-acme: support upper-hex mode of _url_encode The _url_encode function of acme.sh takes an optional 'upper-hex' argument, which makes it output the percent-encoded characters with upper-case hex digits. Our copy of the function in proxmox-acme lacks it and always outputs lower-case hex. The Aliyun DNS plugin of the bundled acme.sh version uses this argument for the signature of its API requests, as the Aliyun API requires upper-case hex there. So the signature never matched, and adding the TXT record always failed with "SignatureDoesNotMatch". Add the argument the same way acme.sh implements it, as suggested in the bug. Upstream changed the Aliyun plugin in the meantime to not rely on the argument anymore, because of bundled copies like ours, but newer plugins, like dns_baidu.sh and dns_hw.sh, use it too. Signed-off-by: Michal Fox --- src/proxmox-acme | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/proxmox-acme b/src/proxmox-acme index 705f7df..18cbf20 100644 --- a/src/proxmox-acme +++ b/src/proxmox-acme @@ -510,7 +510,9 @@ _hex_dump() { } # stdin stdout +#_url_encode [upper-hex] the encoded hex will be upper-case if the argument upper-hex is followed _url_encode() { + _upper_hex=$1 _hex_str=$(_hex_dump) for _hex_code in $_hex_str; do #upper case @@ -720,6 +722,9 @@ _url_encode() { #other hex *) + if [ "$_upper_hex" = "upper-hex" ]; then + _hex_code=$(printf "%s" "$_hex_code" | _upper_case) + fi printf '%%%s' "$_hex_code" ;; esac