Unverified Commit 29a7c193 authored by neil's avatar neil Committed by GitHub
Browse files

Merge pull request #3403 from manuelm/dev

dnsapi/pdns: also normalize json response in detecting root zone
parents e7fc697e 8636d313
...@@ -175,13 +175,13 @@ _get_root() { ...@@ -175,13 +175,13 @@ _get_root() {
i=1 i=1
if _pdns_rest "GET" "/api/v1/servers/$PDNS_ServerId/zones"; then if _pdns_rest "GET" "/api/v1/servers/$PDNS_ServerId/zones"; then
_zones_response="$response" _zones_response=$(echo "$response" | _normalizeJson)
fi fi
while true; do while true; do
h=$(printf "%s" "$domain" | cut -d . -f $i-100) h=$(printf "%s" "$domain" | cut -d . -f $i-100)
if _contains "$_zones_response" "\"name\": \"$h.\""; then if _contains "$_zones_response" "\"name\":\"$h.\""; then
_domain="$h." _domain="$h."
if [ -z "$h" ]; then if [ -z "$h" ]; then
_domain="=2E" _domain="=2E"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment