diff --git a/acme.sh b/acme.sh index 75030acd8c..aa5557e807 100755 --- a/acme.sh +++ b/acme.sh @@ -4690,7 +4690,7 @@ $_authorizations_map" _debug keyauthorization "$keyauthorization" fi - entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')" + entry="$(echo "$response" | sed -n 's#"challenges":\[\([^]]*\)\]#\1#p' | sed 's#\(\}\),\({\)#\1\n\2#' | grep '"type":"'$vtype'"')" _debug entry "$entry" if [ -z "$keyauthorization" -a -z "$entry" ]; then @@ -6251,7 +6251,7 @@ _deactivate() { fi _debug "Trigger validation." vtype="$(_getIdType "$_d_domain")" - entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')" + entry="$(echo "$response" | sed -n 's#"challenges":\[\([^]]*\)\]#\1#p' | sed 's#\(\}\),\({\)#\1\n\2#' | grep '"type":"'$vtype'"')" _debug entry "$entry" if [ -z "$entry" ]; then _err "Error, can not get domain token $d"