Skip to content

Commit 2e85e6f

Browse files
committed
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.
1 parent 9e584e3 commit 2e85e6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dnsapi/dns_opusdns.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ _get_zone() {
145145
fi
146146

147147
_debug "Trying: $h"
148-
if _opusdns_api GET "/v1/dns/$h" && _contains "$response" '"name"'; then
148+
if _opusdns_api GET "/v1/dns/$h" && _contains "$response" '"dnssec_status"'; then
149149
_zone="$h"
150150
_record_name=$(printf "%s" "$domain" | cut -d . -f 1-"$p")
151151
[ -z "$_record_name" ] && _record_name="@"

0 commit comments

Comments
 (0)