Fix zone detection: check for dnssec_status instead of name

The error response also contains 'name' in 'zone_name' field,
causing false positives. Check for 'dnssec_status' which only
exists in valid zone responses.
This commit is contained in:
Kilian Ries committed 2026-01-22 18:13:51 +01:00
1 parent 9e584e346d
commit 2e85e6f9bb
1 file changed
+1 -1
+1 -1
View File
@@ -145,7 +145,7 @@ _get_zone() {
fi
_debug "Trying: $h"
if _opusdns_api GET "/v1/dns/$h" && _contains "$response" '"name"'; then
if _opusdns_api GET "/v1/dns/$h" && _contains "$response" '"dnssec_status"'; then
_zone="$h"
_record_name=$(printf "%s" "$domain" | cut -d . -f 1-"$p")
[ -z "$_record_name" ] && _record_name="@"
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.