diff --git a/dnsapi/dns_czechia.sh b/dnsapi/dns_czechia.sh index 74321b56..1fb20af1 100644 --- a/dnsapi/dns_czechia.sh +++ b/dnsapi/dns_czechia.sh @@ -21,10 +21,9 @@ dns_czechia_add() { return 1 fi - # Normalizace zóny pro URL (bez tečky na konci) - _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" + # Totální očista zóny (povolena jen malá písmena, čísla, tečky a pomlčky) + _current_zone=$(printf "%s" "$_current_zone" | _lower_case | sed 's/[^a-z0-9.-]//g; s/\.$//') + _url="$CZ_API_BASE/api/DNS/$_current_zone/TXT" _fd=$(echo "$fulldomain" | _lower_case | sed 's/\.$//') _cz=$(echo "$_current_zone" | _lower_case | sed 's/\.$//') @@ -53,9 +52,9 @@ dns_czechia_rm() { _current_zone=$(_czechia_pick_zone "$fulldomain") [ -z "$_current_zone" ] && return 1 - _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" + # Totální očista zóny + _current_zone=$(printf "%s" "$_current_zone" | _lower_case | sed 's/[^a-z0-9.-]//g; s/\.$//') + _url="$CZ_API_BASE/api/DNS/$_current_zone/TXT" _fd=$(echo "$fulldomain" | _lower_case | sed 's/\.$//') _cz=$(echo "$_current_zone" | _lower_case | sed 's/\.$//')