issue: strip the trailing dot of a fully-qualified alias domain

A trailing dot in --domain-alias/--challenge-alias was passed through
to the dnsapi hook verbatim. Providers with exact-match record-name
lookups (e.g. Cloudflare's name= filter) then never find the record,
so rm never deletes it and relic TXT records accumulate on every issue.
Stripping in issue() also fixes certs with a dotted alias already
saved in domain.conf.

fix https://github.com/acmesh-official/acme.sh/issues/4636
This commit is contained in:
neil 2026-07-10 11:22:20 +08:00
parent 534a1714dc
commit 90b4795bb1

View file

@ -5350,6 +5350,8 @@ $_authorizations_map"
fi
_d_alias="$(_getfield "$_challenge_alias" "$_alias_index")"
test "$_d_alias" = "$NO_VALUE" && _d_alias=""
# strip the trailing dot of a fully-qualified alias domain
_d_alias="${_d_alias%.}"
_alias_index="$(_math "$_alias_index" + 1)"
_debug "_d_alias" "$_d_alias"
if [ "$_d_alias" ]; then