mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2026-01-15 21:08:20 +08:00
fix(dynv6): allow 'id' in dns challenge
If the random dns challenge string happens to contain 'id', the parsing method passed a broken, mingled mix of the record's data and id field, instead of just the id. As a result, deleting the TXT record failed. We now specifically look for '"id":', which cannot appear as part of the challenge string.
This commit is contained in:
@@ -234,7 +234,7 @@ _get_record_id() {
|
|||||||
|
|
||||||
_get_record_id_from_response() {
|
_get_record_id_from_response() {
|
||||||
response="$1"
|
response="$1"
|
||||||
_record_id="$(echo "$response" | tr '}' '\n' | grep "\"name\":\"$record\"" | grep "\"data\":\"$value\"" | tr ',' '\n' | grep id | tr -d '"' | tr -d 'id:')"
|
_record_id="$(echo "$response" | tr '}' '\n' | grep "\"name\":\"$record\"" | grep "\"data\":\"$value\"" | tr ',' '\n' | grep '"id":' | tr -d '"' | tr -d 'id:' | tr -d '{')"
|
||||||
#_record_id="${_record_id#id:}"
|
#_record_id="${_record_id#id:}"
|
||||||
if [ -z "$_record_id" ]; then
|
if [ -z "$_record_id" ]; then
|
||||||
_err "no such record: $record found in zone $_zone_id"
|
_err "no such record: $record found in zone $_zone_id"
|
||||||
|
|||||||
Reference in New Issue
Block a user