mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-10-21 21:31:51 +00:00
This commit is contained in:
1 parent
1241649501
commit
eabd23a551
1 file changed
+10
-2
+10
-2
@@ -264,8 +264,16 @@ _set_namecheap_TXT() {
|
|||||||
_debug hosts "$hosts"
|
_debug hosts "$hosts"
|
||||||
|
|
||||||
if [ -z "$hosts" ]; then
|
if [ -z "$hosts" ]; then
|
||||||
_err "Hosts not found"
|
# An empty host list is only acceptable when the API positively confirms
|
||||||
return 1
|
# a successful getHosts reply: setHosts below REPLACES all records, so
|
||||||
|
# proceeding on a malformed/unparsed response would wipe the whole zone.
|
||||||
|
# https://github.com/acmesh-official/acme.sh/issues/6963
|
||||||
|
if _contains "$response" "Status=\"OK\"" && _contains "$response" "DomainDNSGetHostsResult"; then
|
||||||
|
_debug "No existing host records, adding the TXT record as the first one"
|
||||||
|
else
|
||||||
|
_err "Hosts not found"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_namecheap_reset_hostList
|
_namecheap_reset_hostList
|
||||||
|
|||||||