Browse Source
Update dns_czechia.sh
dns_czechia: sanitise and encode zone name to fix Invalid domain error
pull/6764/head
CZECHIA-COM
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
6 additions and
4 deletions
-
dnsapi/dns_czechia.sh
|
|
|
@ -22,8 +22,9 @@ dns_czechia_add() { |
|
|
|
fi |
|
|
|
|
|
|
|
# Normalizace zóny pro URL (bez tečky na konci) |
|
|
|
_current_zone=$(echo "$_current_zone" | sed 's/\.$//') |
|
|
|
_url="$CZ_API_BASE/api/DNS/$_current_zone/TXT" |
|
|
|
_current_zone=$(printf "%s" "$_current_zone" | tr -d '[:space:]' | _lower_case | sed 's/\.$//') |
|
|
|
_encoded_zone=$(_unicode_url_encode "$_current_zone") |
|
|
|
_url="$CZ_API_BASE/api/DNS/$_encoded_zone/TXT" |
|
|
|
|
|
|
|
_fd=$(echo "$fulldomain" | _lower_case | sed 's/\.$//') |
|
|
|
_cz=$(echo "$_current_zone" | _lower_case | sed 's/\.$//') |
|
|
|
@ -52,8 +53,9 @@ dns_czechia_rm() { |
|
|
|
_current_zone=$(_czechia_pick_zone "$fulldomain") |
|
|
|
[ -z "$_current_zone" ] && return 1 |
|
|
|
|
|
|
|
_current_zone=$(echo "$_current_zone" | sed 's/\.$//') |
|
|
|
_url="$CZ_API_BASE/api/DNS/$_current_zone/TXT" |
|
|
|
_current_zone=$(printf "%s" "$_current_zone" | tr -d '[:space:]' | _lower_case | sed 's/\.$//') |
|
|
|
_encoded_zone=$(_unicode_url_encode "$_current_zone") |
|
|
|
_url="$CZ_API_BASE/api/DNS/$_encoded_zone/TXT" |
|
|
|
|
|
|
|
_fd=$(echo "$fulldomain" | _lower_case | sed 's/\.$//') |
|
|
|
_cz=$(echo "$_current_zone" | _lower_case | sed 's/\.$//') |
|
|
|
|