Browse Source

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.
pull/6760/head
Kilian Ries 4 days ago
parent
commit
2e85e6f9bb
  1. 2
      dnsapi/dns_opusdns.sh

2
dnsapi/dns_opusdns.sh

@ -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="@"

Loading…
Cancel
Save