Fixed a bug where the zone_id was corrupted for domains containing the string 'id' dns_dynv6.sh

This will now search for `"id:"` instead of `id` and therefore will only find the id field and not any other field containing the sub-string 'id'
pull/5218/head
IIIPr0t0typ3III 2024-07-05 18:43:11 +02:00 committed by GitHub
parent 65868ab8a7
commit 5789e80d74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ _get_zone_id() {
return 1 return 1
fi fi
zone_id="$(echo "$response" | tr '}' '\n' | grep "$selected" | tr ',' '\n' | grep id | tr -d '"')" zone_id="$(echo "$response" | tr '}' '\n' | grep "$selected" | tr ',' '\n' | grep '"id":' | tr -d '"')"
_zone_id="${zone_id#id:}" _zone_id="${zone_id#id:}"
_debug "zone id: $_zone_id" _debug "zone id: $_zone_id"
} }