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:
+4
-2
@@ -15,7 +15,8 @@ CN_API="https://beta.api.core-networks.de"
|
|||||||
######## Public functions #####################
|
######## Public functions #####################
|
||||||
|
|
||||||
dns_cn_add() {
|
dns_cn_add() {
|
||||||
fulldomain=$1
|
# Core-Networks API requires punycode for IDN domains
|
||||||
|
fulldomain=$(_idn "$1")
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
|
|
||||||
if ! _cn_login; then
|
if ! _cn_login; then
|
||||||
@@ -58,7 +59,8 @@ dns_cn_add() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dns_cn_rm() {
|
dns_cn_rm() {
|
||||||
fulldomain=$1
|
# Core-Networks API requires punycode for IDN domains
|
||||||
|
fulldomain=$(_idn "$1")
|
||||||
txtvalue=$2
|
txtvalue=$2
|
||||||
|
|
||||||
if ! _cn_login; then
|
if ! _cn_login; then
|
||||||
|
|||||||
Reference in New Issue
Block a user