mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-08-18 15:13:29 +08:00
dns_cn: convert IDN domain to punycode before API calls
Core-Networks' API rejects Unicode domain names with "invalid domain"; it requires punycode. dns_cn_add / dns_cn_rm passed the raw challenge domain straight through, so IDN certs failed at the TXT add step (issue #4804). Run fulldomain through _idn() in both functions. For ASCII/punycode input _idn() is a pass-through, so non-IDN domains are unaffected. Fixes #4804
This commit is contained in:
@@ -15,7 +15,8 @@ CN_API="https://beta.api.core-networks.de"
|
||||
######## Public functions #####################
|
||||
|
||||
dns_cn_add() {
|
||||
fulldomain=$1
|
||||
# Core-Networks API requires punycode for IDN domains
|
||||
fulldomain=$(_idn "$1")
|
||||
txtvalue=$2
|
||||
|
||||
if ! _cn_login; then
|
||||
@@ -58,7 +59,8 @@ dns_cn_add() {
|
||||
}
|
||||
|
||||
dns_cn_rm() {
|
||||
fulldomain=$1
|
||||
# Core-Networks API requires punycode for IDN domains
|
||||
fulldomain=$(_idn "$1")
|
||||
txtvalue=$2
|
||||
|
||||
if ! _cn_login; then
|
||||
|
||||
Reference in New Issue
Block a user